]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't limit gnus thread searches to a single message
authorAndrew G Cohen <cohen@andy.bu.edu>
Sun, 7 Apr 2024 23:36:17 +0000 (07:36 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:40:34 +0000 (15:40 +0200)
* lisp/gnus/gnus-search.el (gnus-search-single-p): Searches for a
single message id finish after finding this one message; thread searches
continue until all messages are found.

(cherry picked from commit d335f28aa9bfb85d0e35b838ca867d97ebe5b974)

lisp/gnus/gnus-search.el

index a967d6d71dab230dfa80a78363c66884e8b8aec9..9cff2e2f1090e959cb80e5a0b8208a1af78fb9ad 100644 (file)
@@ -1002,10 +1002,11 @@ Responsible for handling and, or, and parenthetical expressions.")
 
 (defsubst gnus-search-single-p (query)
   "Return t if QUERY is a search for a single message."
-  (let ((q (alist-get 'parsed-query query)))
-    (and (= (length q ) 1)
-        (consp (car-safe q))
-        (eq (caar q) 'id))))
+  (unless (alist-get 'thread query)
+    (let ((q (alist-get 'parsed-query query)))
+      (and (= (length q ) 1)
+          (consp (car-safe q))
+          (eq (caar q) 'id)))))
 
 (cl-defmethod gnus-search-transform ((engine gnus-search-engine)
                                     (query list))