From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: Gnus nnmail-split-fancy =?utf-8?Q?rege?= =?utf-8?B?eHBzIGNhbuKAmXQ=?= support backrefs inside themselves? Date: Mon, 19 Mar 2018 16:10:32 +0100 Message-ID: <20180319151032.GE5393@tuxteam.de> References: <4i30kmyxt8ln.1gu.xxuns.g6.gal@galex-713.eu> <20180317082506.GA23646@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1521472151 1272 195.159.176.226 (19 Mar 2018 15:09:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2018 15:09:11 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: help-gnu-emacs To: "Garreau, Alexandre" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 19 16:09:07 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exwPJ-0000FS-JQ for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Mar 2018 16:09:05 +0100 Original-Received: from localhost ([::1]:42470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exwRM-0005fI-Tc for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Mar 2018 11:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exwQu-0005ey-MC for help-gnu-emacs@gnu.org; Mon, 19 Mar 2018 11:10:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exwQr-0007CU-Et for help-gnu-emacs@gnu.org; Mon, 19 Mar 2018 11:10:44 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:49845) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1exwQr-00071O-3Z for help-gnu-emacs@gnu.org; Mon, 19 Mar 2018 11:10:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=20171004; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=RhoC/msZEO3S+ozGl0xmnAOzAlj0ySH46oHKek1FxcY=; b=vQiqObk0eazVtY0boOvOw+rqYogZ9KY7c0eOvTKEMyr+JklsuylXO0hXGzsZn10s9jOa5lHe69Tkwo+FoqKL6eX8M3iPgihExbprdRXc1Gbzq5nw6vRLOKU8ipH5t9MIiP+ppeDrCxByJ0Ok/Dj5YdCuQX50VULrcXqSATgUaKShF9/3G8ok6y47Z9Fg+VgiMBEdvpUIjmnfE8eAf7U6AMhDyWs6xokVOdH42fsSgWkCTFJvRjHMJqMh3FRVgDR6TmuhUyXZV+n3nYzShgxabo/86b9BhV4hbnUADU7rilyg3kH4XCNYJPoNvSsm5/TxeRIbogXIxiNTYVb+I4Txlg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1exwQi-0002Wl-Um; Mon, 19 Mar 2018 16:10:32 +0100 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116206 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, Mar 19, 2018 at 01:57:07PM +0100, Garreau, Alexandre wrote: > 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 “”, 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 > “”? By this you mean the one from your original mail, the one above, i.e. ".*<\\(gcc\\)-\\(help\\).\\1.\\(gnu\\)\\.org>.*"? For me, it matches: (string-match ".*<\\(gcc\\)-\\(help\\).\\1.\\(gnu\\)\\.org>.*" "") (returns 0, which is the start index. All is well). Escaping the dots matches too, btw. Cheers - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlqv0ugACgkQBcgs9XrR2kb0TwCff38mQighe65RPZcHEyMriqZP vNsAn1YgLztlYBFTnV0dQkjrMRMB0/4U =3clN -----END PGP SIGNATURE-----