Subject: Re: bug#46047: 28.0.50; Namazu-based mail searching not working anymore

From: Eric Abrahamsen <[email-masked]>
Date: Fri, 21 May 2021 10:47:26 -0700

Eli Zaretskii <[email-masked]> writes:

>> From: Eric Abrahamsen <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Tue, 18 May 2021 09:50:00 -0700
>> 
>> > I think it's process exit status notification and comes from the
>> > process sentinel function.
>> 
>> Huh, I'm surprised this hasn't been an issue before, then. It looks like
>> that message is standard for any start-process/accept-process-output
>> situation. Is there any way to shut it off?
>
> The only way I know of is to provide your own sentinel function.
>
>> Regardless, the output parsing shouldn't be so fragile that it chokes on
>> this. I'll look into making it more robust.
>
> Agreed, and thanks in advance.

Torsten, if you have a moment, would you try the attached diff and
confirm that it fixes the problem you're seeing?

Thanks,
Eric

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index a59d0e57a7..fc9f8684f6 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1358,9 +1358,12 @@ gnus-search-indexed-parse-output
 			 "\\|")))
 	artlist vectors article group)
     (goto-char (point-min))
-    (while (not (eobp))
+    (while (not (or (eobp)
+                    (looking-at-p
+                     "\\(?:[[:space:]\n]+\\)?Process .+ finished")))
       (pcase-let ((`(,f-name ,score) (gnus-search-indexed-extract engine)))
-	(when (and (file-readable-p f-name)
+	(when (and f-name
+                   (file-readable-p f-name)
 		   (null (file-directory-p f-name))
 		   (or (null groups)
 		       (and (gnus-search-single-p query)