[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46271: 28.0.50; [PATCH] Properly quote group names for gnus-search
From: |
Basil L. Contovounesios |
Subject: |
bug#46271: 28.0.50; [PATCH] Properly quote group names for gnus-search |
Date: |
Mon, 08 Feb 2021 19:11:57 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> So I think it has to get messier:
>
> (let ((groups '("mail+" "gnus.gener+al" "archive.2007.10")))
> (mapconcat
> #'identity
> (mapcar
> (lambda (group-name)
> (mapconcat #'regexp-quote
> (split-string
> (gnus-group-real-name group-name)
> "[.\\/]")
> "[.\\\\/]"))
> groups)
> "\\|"))
AKA:
(let ((groups '("mail+" "gnus.gener+al" "archive.2007.10")))
(mapconcat
(lambda (group-name)
(mapconcat #'regexp-quote
(split-string
(gnus-group-real-name group-name)
"[.\\/]")
"[.\\\\/]"))
groups
"\\|"))
> Also, I'd prefer not to use rx in this case, simply because this:
>
> "[.\\/]"
>
> turns into this:
>
> (rx (or "\\." "\\\\" "/"))
Or (rx (in "./\\")), or (rx (in ?. ?/ ?\\)), or...
--
Basil