From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: <tomas@tuxteam.de>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Gnus nnmail-split-fancy regexps can’t support backrefs inside themselves?
Date: Mon, 19 Mar 2018 13:57:07 +0100 [thread overview]
Message-ID: <u05voxvxb6ln.spu.xxuns.g6.gal@galex-713.eu> (raw)
In-Reply-To: <20180317082506.GA23646@tuxteam.de> (tomas@tuxteam.de's message of "Sat, 17 Mar 2018 09:25:06 +0100")
Le 17/03/2018 à 09h25, tomas@tuxteam.de a écrit :
> On Fri, Mar 16, 2018 at 08:15:59PM +0100, Garreau, Alexandre wrote:
>> If I use a rule with a match regexp including a backreference inside the
>> variable nnmail-split-fancy, it doesn’t match anything anymore:
>> ("list-id" ".*<\\(gcc\\)-\\(help\\).\\1.\\(gnu\\)\\.org>.*" "lists.\\3.\\1.\\2")
>
> What are you trying to match? The above will match "gcc-help#gcc#gnu.org
> (where '#' stands here for any character). This looks strange to me (what
> is the use of \\(...\\) for a constant match? \1 will always (in the case
> of a match, that is) be "gcc", \2 always "help" and \3 always "gnu".
>
> Is that really your intention? What are you trying to match?
Yes, and sorry (for the .), indeed I did correct this since, it is now
".*<\\(gcc\\)-\\(help\\)\\.gcc\\.\\(gnu\\)\\.org>.*". As the variable
I’m talking about and the car of the list I’m talking about show, I’m
trying to match the list-id mail header of the gcc-help mailing list,
which contains “<gcc-help.gcc.gnu.org>”, but I reuse the words “gnu”,
“gcc” and help in the group name I’m splitting this in
(“lists.gnu.gcc.help”), so I group these names, so that later I can
better factorise with other splitting rules. For maintainance and
factorisations reasons, I’d also like to write “gcc” only once here,
except it seems gnus/mail-split stops to match anything as soon as I
include backrefs in the searching regexp.
>> Yet backrefs are supported on the other side of the rule… is this
>> normal? why is that? I at least would like a confirmation ^^
>
> Yes, backreferences should work OK.
So why isn’t this regexp matching any line containing
“<gcc-help.gcc.gnu.org>”?
next prev parent reply other threads:[~2018-03-19 12:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 19:15 Gnus nnmail-split-fancy regexps can’t support backrefs inside themselves? Garreau, Alexandre
2018-03-17 8:25 ` tomas
2018-03-19 12:57 ` Garreau, Alexandre [this message]
2018-03-19 15:10 ` tomas
2018-03-20 20:20 ` Stefan Monnier
2018-03-20 21:09 ` tomas
2018-03-20 22:05 ` Stefan Monnier
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=u05voxvxb6ln.spu.xxuns.g6.gal@galex-713.eu \
--to=galex-713@galex-713.eu \
--cc=help-gnu-emacs@gnu.org \
--cc=tomas@tuxteam.de \
/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.