From 1b0e6a16d3ae32576a642898c39695a3affd2fd7 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Mon, 8 Feb 2021 12:27:04 -0800 Subject: [PATCH] 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 4538370584b..d7b1c06114b 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)) -- 2.39.5