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)
committerAndrew G Cohen <cohen@andy.bu.edu>
Fri, 10 May 2024 00:39:35 +0000 (08:39 +0800)
* 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.

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))