all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
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 19:11:57 +0000	[thread overview]
Message-ID: <87pn1as7b6.fsf@tcd.ie> (raw)
In-Reply-To: <87o8gvjyzk.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 07 Feb 2021 14:26:39 -0800")

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





  reply	other threads:[~2021-02-08 19:11 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 [this message]
2021-02-08 20:13       ` Eric Abrahamsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn1as7b6.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=46271@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.