]> git.eshelyaron.com Git - emacs.git/commitdiff
Run Gnus group names through regexp-quote when matching results
authorEric Abrahamsen <eric@ericabrahamsen.net>
Mon, 8 Feb 2021 20:27:04 +0000 (12:27 -0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Mon, 8 Feb 2021 20:27:04 +0000 (12:27 -0800)
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Be more
careful about making sure group names will match search results
correctly.

lisp/gnus/gnus-search.el

index 4538370584bcac15868c14ad0252481e55572298..d7b1c06114ba14365e70c897b853ca863d9477d4 100644 (file)
@@ -1348,12 +1348,14 @@ Returns a list of [group article score] vectors."
   (let ((prefix (slot-value engine 'remove-prefix))
        (group-regexp (when groups
                        (mapconcat
-                        (lambda (x)
-                          (replace-regexp-in-string
-                           ;; Accept any of [.\/] as path separators.
-                           "[.\\/]" "[.\\\\/]"
-                           (gnus-group-real-name x)))
-                        groups "\\|")))
+                        (lambda (group-name)
+                          (mapconcat #'regexp-quote
+                                     (split-string
+                                      (gnus-group-real-name group-name)
+                                      "[.\\/]")
+                                     "[.\\\\/]"))
+                        groups
+                        "\\|")))
        artlist vectors article group)
     (goto-char (point-min))
     (while (not (eobp))