Hi again,

So, summing up what we have so far (patch attached), the effect of these
changes is to make the errors go away, but i'm not sure if the behaviour
is expected: with the patch applied, A T will "work" for me in an
nnselect group, with the caveat that, when gnus-refer-thread-use-search
is t (or when calling gnus-refer-thread with C-u otherwise), the result
is limited to the email already present in the nnselect group... that
might be expected, in which case i think the patch can be applied (it's
basically what you already propose, Eric, except it constructs the query
as an alist).

Cheers,
jao
-- 
There are two hard things in computer science: cache invalidation,
naming things, and off-by-one errors.

>From b56af8eb9c708ae9b700a061908509e16bc5bab4 Mon Sep 17 00:00:00 2001
From: Jose A Ortega Ruiz <[email protected]>
Date: Mon, 27 Dec 2021 21:42:32 +0000
Subject: [PATCH] fixes for threaded notmuch searches

---
 lisp/gnus/gnus-search.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index d64c0cb90c..0743ee79ff 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1611,8 +1611,8 @@ gnus-search-run-search
 	  (cl-call-next-method
 	   engine server
 	   ;; Completely replace the query with our new thread-based one.
-	   (mapconcat (lambda (thrd) (concat "thread:" thrd))
-		      thread-ids " or ")
+	   `((query . ,(mapconcat (lambda (thrd) (concat "thread:" thrd))
+		                  thread-ids " or ")))
 	   nil)))
     (cl-call-next-method engine server query groups)))
 
@@ -1630,7 +1630,7 @@ gnus-search-indexed-search-command
 	,(if thread
 	     "--output=threads"
 	   "--output=files")
-	"--duplicate=1" ; I have found this necessary, I don't know why.
+        ,@(unless thread '("--duplicate=1"))  ; I have found this necessary, I don't know why.
 	,@switches
 	,(if limit (format "--limit=%d" limit) "")
 	,qstring
-- 
2.34.1

Reply via email to