From: Alexandre Oliva <oliva@dcc.unicamp.br>
Cc: "Petersen Jens-Ulrik (NRC/Tokyo)" <jens-ulrik.petersen@nokia.com>,
ding@gnus.org
Subject: Re: `nnmail-split-fancy' regexp
Date: 25 Jun 1999 06:42:34 -0300 [thread overview]
Message-ID: <ord7ykaa5x.fsf@saci.lsd.dcc.unicamp.br> (raw)
In-Reply-To: Per Abrahamsen's message of "24 Jun 1999 20:26:38 +0200"
[-- Attachment #1: Type: text/plain, Size: 2528 bytes --]
On Jun 24, 1999, Per Abrahamsen <abraham@dina.kvl.dk> wrote:
> "Petersen Jens-Ulrik (NRC/Tokyo)" <jens-ulrik.petersen@nokia.com> writes:
>> I found the restriction that string VALUE regexp's should match to
>> whole words too restrictive...
> There are zillions of nnmail-split-fancy rules written using that
> assumption, and many of them represent a huge work effort. Mine has
> approximately 300 rules.
> If you want the rules to be interpreted differently, invent a new
> variable and a new split method for it.
How about using a magic meaningless prefix to select non-full-word
matches, say, `[partial]'. I doubt anyone starts their VALUE splits
with `[partial]', particularly because of the duplicate `a', which
wouldn't be totally useless in terms of regular expressions. I've
just implemented it; patch attached.
While I was at it, I took the time to introduce a new feature that I
had requested for some weeks ago. As a memory refresher, the problem
was that I subscribed to the "libtool" and "bug-libtool" mailing
lists, and there was no way to avoid that messages posted only to
"bug-libtool" were cross-posted to "libtool" without preventing
cross-posting when the message was *really* posted to both lists. The
syntax I've come up with is:
(FIELD VALUE [- RESTRICT [- RESTRICT [...]]] SPLIT)
So that now I can write:
(| (& (any "libtool@gnu\\.org" - "bug-libtool" "libtool")
(any "bug-libtool@gnu\\.org" "bug-libtool")
;; ...
)
"misc")
The construction above is not equivalent to:
(| (& (any "libtool@gnu\\.org" (| (any "bug-libtool@gnu\\.org" nil)
"libtool"))
(any "bug-libtool@gnu\\.org" "bug-libtool") ;; ...
because the latter would not cross-post in case a message is posted to
both mailing lists, whereas the former will. A RESTRICT clause will
only be considered if there is a match that starts after the end of
the FIELD match and ends after the beginning of the VALUE match.
And since I was rewriting that code anyway, I took the time to fix the
searching mechanism so that it looks for multiple matches of FIELD
VALUE, so that SPLITs that involve \N substitutions are properly
handled, causing cross-posting without introducing duplicates.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
[-- Attachment #2: partial&restrict.patch --]
[-- Type: application/x-patch, Size: 10195 bytes --]
next prev parent reply other threads:[~1999-06-25 9:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-24 8:25 Petersen Jens-Ulrik (NRC/Tokyo)
1999-06-24 18:26 ` Per Abrahamsen
1999-06-25 7:52 ` Petersen Jens-Ulrik (NRC/Tokyo)
1999-06-25 9:48 ` Kai.Grossjohann
1999-06-25 10:28 ` Alexandre Oliva
1999-06-25 11:48 ` Kai.Grossjohann
1999-06-25 12:51 ` Alexandre Oliva
1999-06-25 9:42 ` Alexandre Oliva [this message]
1999-06-25 12:25 ` Per Abrahamsen
1999-06-28 17:33 ` Lars Magne Ingebrigtsen
1999-06-28 18:14 ` Aaron M. Ucko
1999-06-28 18:49 ` Per Abrahamsen
1999-06-28 19:11 ` Alexandre Oliva
1999-07-04 3:07 ` Lars Magne Ingebrigtsen
1999-07-04 21:15 ` Alexandre Oliva
1999-07-04 22:54 ` Alexandre Oliva
1999-07-07 14:28 ` Toby Speight
1999-07-07 17:38 ` Alexandre Oliva
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=ord7ykaa5x.fsf@saci.lsd.dcc.unicamp.br \
--to=oliva@dcc.unicamp.br \
--cc=ding@gnus.org \
--cc=jens-ulrik.petersen@nokia.com \
/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.
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 NNTP newsgroup(s).