From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: jflack@disroot.org, 46271@debbugs.gnu.org
Subject: bug#46271: 28.0.50; [PATCH] Properly quote group names for gnus-search
Date: Mon, 08 Feb 2021 12:13:38 -0800 [thread overview]
Message-ID: <87czxa5nd9.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87pn1as7b6.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 08 Feb 2021 19:11:57 +0000")
On 02/08/21 19:11 PM, Basil L. Contovounesios wrote:
> 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
> "\\|"))
Ha! That was a brain malfunction.
>> 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...
That first one's not bad, but I still don't feel like it's a real
improvement over the plain regexp.
Anyway, thanks for the tuneup. I think we can just go with this.
Eric
prev parent reply other threads:[~2021-02-08 20:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 13:31 bug#46271: 28.0.50; [PATCH] Properly quote group names for gnus-search jflack--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-03 18:54 ` Basil L. Contovounesios
2021-02-04 0:52 ` jflack--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 10:38 ` Basil L. Contovounesios
2021-02-03 23:01 ` Eric Abrahamsen
2021-02-07 22:26 ` Eric Abrahamsen
2021-02-08 19:11 ` Basil L. Contovounesios
2021-02-08 20:13 ` Eric Abrahamsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czxa5nd9.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=46271@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=jflack@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).