]> git.eshelyaron.com Git - emacs.git/commitdiff
Robustify parsing of gnus-search search results
authorEric Abrahamsen <eric@ericabrahamsen.net>
Fri, 21 May 2021 20:35:38 +0000 (13:35 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Fri, 21 May 2021 20:35:38 +0000 (13:35 -0700)
* 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

index a59d0e57a79e84448f494dfe3e6d93f97cf4fb51..fc9f8684f6394623fe518e9cc7529560fc65bd48 100644 (file)
@@ -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)