]> git.eshelyaron.com Git - emacs.git/commitdiff
Further fix to filtering Gnus search group names
authorEric Abrahamsen <eric@ericabrahamsen.net>
Fri, 6 Aug 2021 00:53:05 +0000 (17:53 -0700)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sat, 7 Aug 2021 15:21:26 +0000 (08:21 -0700)
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Group
names in the GROUPS argument may be prefixed or not, depending on
which server we're searching, so always enforce prefix policy within
the function.

lisp/gnus/gnus-search.el

index 53af2f6fe6aa2f760ee48e6cd8d98d2a5c64cb03..8182630dfed287322cc408ac227a3588117a84f0 100644 (file)
@@ -1358,6 +1358,7 @@ Returns a list of [group article score] vectors."
                                                server query &optional groups)
   (let ((prefix (or (slot-value engine 'remove-prefix)
                     ""))
+        (groups (mapcar #'gnus-group-short-name groups))
        artlist article group)
     (goto-char (point-min))
     ;; Prep prefix, we want to at least be removing the root
@@ -1384,7 +1385,6 @@ Returns a list of [group article score] vectors."
                    nil t)
                  nil t)
                 nil t))
-          (setq group (gnus-group-full-name group server))
           (setq article (file-name-nondirectory f-name)
                 article
                 ;; TODO: Provide a cleaner way of producing final
@@ -1404,10 +1404,12 @@ Returns a list of [group article score] vectors."
       (setq artlist (gnus-search-grep-search engine artlist grep-reg)))
     ;; Munge into the list of vectors expected by nnselect.
     (mapcar (pcase-lambda (`(,_ ,article ,group ,score))
-              (vector group article
-                      (if (numberp score)
-                         score
-                       (string-to-number score))))
+              (vector
+               (gnus-group-full-name group server)
+               article
+               (if (numberp score)
+                  score
+                (string-to-number score))))
             artlist)))
 
 (cl-defmethod gnus-search-indexed-extract ((_engine gnus-search-indexed))