From: joda@pdc.kth.se (Johan Danielsson)
Subject: nnmail-split-it
Date: 02 Feb 1997 23:06:30 +0100 [thread overview]
Message-ID: <xofiv4aual5.fsf@blubb.pdc.kth.se> (raw)
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
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?
/Johan
[-- Attachment #2: Type: text/plain, Size: 1387 bytes --]
--- nnmail.el 1997/02/02 21:31:10 1.1
+++ nnmail.el 1997/02/02 21:33:46
@@ -1133,7 +1133,7 @@
;; Check the cache for the regexp for this split.
;; FIX FIX FIX could avoid calling assq twice here
((assq split nnmail-split-cache)
- (goto-char (point-max))
+ (goto-char (point-min))
;; FIX FIX FIX problem with re-search-backward is that if you have
;; a split: (from "foo-\\(bar\\|baz\\)@gnus.org "mail.foo.\\1")
;; and someone mails a message with 'To: foo-bar@gnus.org' and
@@ -1148,15 +1148,15 @@
;; removed duplicates, since there might be more of those.
;; I guess we could also remove duplicates in the & split case, since
;; that's the only thing that can introduce them.
- (when (re-search-backward (cdr (assq split nnmail-split-cache)) nil t)
+ (when (re-search-forward (cdr (assq split nnmail-split-cache)) nil t)
;; Someone might want to do a \N sub on this match, so get the
;; correct match positions.
- (goto-char (match-end 0))
+ (goto-char (match-end 2))
(let ((value (nth 1 split)))
- (re-search-backward (if (symbolp value)
+ (re-search-forward (if (symbolp value)
(cdr (assq value nnmail-split-abbrev-alist))
value)
- (match-end 1)))
+ (match-end 0)))
(nnmail-split-it (nth 2 split))))
;; Not in cache, compute a regexp for the field/value pair.
next reply other threads:[~1997-02-02 22:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-02 22:06 Johan Danielsson [this message]
1997-02-03 23:28 ` nnmail-split-it David Moore
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=xofiv4aual5.fsf@blubb.pdc.kth.se \
--to=joda@pdc.kth.se \
/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).