emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5fe343a: Robustify parsing of gnus-search search results


From: Eric Abrahamsen
Subject: master 5fe343a: Robustify parsing of gnus-search search results
Date: Fri, 21 May 2021 16:37:23 -0400 (EDT)

branch: master
commit 5fe343a44cdd83c43793c86b92ab5dd16a29bc3a
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Robustify parsing of gnus-search search results
    
    * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Look
    for a "process finished" tag, and don't choke on mis-parsed lines.
---
 lisp/gnus/gnus-search.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index a59d0e5..fc9f868 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1358,9 +1358,12 @@ Returns a list of [group article score] vectors."
                         "\\|")))
        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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]