emacs-diffs
[Top][All Lists]
Advanced

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

master 1b0e6a1: Run Gnus group names through regexp-quote when matching


From: Eric Abrahamsen
Subject: master 1b0e6a1: Run Gnus group names through regexp-quote when matching results
Date: Mon, 8 Feb 2021 17:38:36 -0500 (EST)

branch: master
commit 1b0e6a16d3ae32576a642898c39695a3affd2fd7
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Run Gnus group names through regexp-quote when matching results
    
    * 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 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 4538370..d7b1c06 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -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))



reply via email to

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