Gnus development mailing list
 help / color / mirror / Atom feed
From: David Moore <dmoore@UCSD.EDU>
Subject: Re: nnmail-split-it
Date: 03 Feb 1997 15:28:08 -0800	[thread overview]
Message-ID: <rvraixqxkn.fsf@sdnp5.ucsd.edu> (raw)
In-Reply-To: joda@pdc.kth.se's message of 02 Feb 1997 23:06:30 +0100

joda@pdc.kth.se (Johan Danielsson) writes:

> Nnmail-split-it is currently using re-search-backward, this fails with
> splits like this:
> 
> ("sender" "\\(.*\\)@foo.org" "foo-\\1")
> 
> What will searching forward break?

	If there are multiple headers which match, it'll get the earlier
ones rather than the latter ones.  The problem in this case however is
the two competing .*'s in the regexp.  A better fix is probably just
make the innermost regexp-search-backwards into a forwards, not both of
them.

	And a much better fix would be to preparse the message headers,
to allow much faster comparisons, as it's really slow currently with
lots of split rules.  Something like making a list of header names to
the start/end points of that header's value in the buffer might be
good.  Then you just do string-match of the field designator to each
thing in the list, and the first one which matches, you apply the value
regexp to the buffer limited to the start/end region.

-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | In a cloud bones of steel.


  reply	other threads:[~1997-02-03 23:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-02 22:06 nnmail-split-it Johan Danielsson
1997-02-03 23:28 ` David Moore [this message]
1997-02-04  1:29   ` nnmail-split-it Paul Franklin
1997-02-04  1:55     ` nnmail-split-it Lars Magne Ingebrigtsen
1997-02-04  4:35       ` nnmail-split-it David Moore
1997-02-04  6:16         ` nnmail-split-it anonymous
1997-02-04  8:37       ` nnmail-split-it Per Abrahamsen
1997-02-04 18:05         ` nnmail-split-it David Moore
1997-02-04 19:58           ` nnmail-split-it Lars Magne Ingebrigtsen
1997-02-05  6:44             ` nnmail-split-it Paul Franklin
1997-02-05  8:24           ` nnmail-split-it Per Abrahamsen
1997-02-04  0:46 ` nnmail-split-it Lars Magne Ingebrigtsen

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=rvraixqxkn.fsf@sdnp5.ucsd.edu \
    --to=dmoore@ucsd.edu \
    /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).