From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9767 Path: main.gmane.org!not-for-mail From: joda@pdc.kth.se (Johan Danielsson) Newsgroups: gmane.emacs.gnus.general Subject: nnmail-split-it Date: 02 Feb 1997 23:06:30 +0100 Sender: joda@pdc.kth.se Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.103) Content-Type: multipart/mixed; boundary="Multipart_Sun_Feb__2_23:06:29_1997-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035149739 20382 80.91.224.250 (20 Oct 2002 21:35:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:35:39 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id OAA08382 for ; Sun, 2 Feb 1997 14:16:42 -0800 Original-Received: from blubb.pdc.kth.se (blubb.pdc.kth.se [130.237.225.158]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 2 Feb 1997 23:06:31 +0100 Original-Received: (from joda@localhost) by blubb.pdc.kth.se (8.8.4/8.8.4) id XAA04845; Sun, 2 Feb 1997 23:06:30 +0100 (MET) Original-To: ding@ifi.uio.no Original-Lines: 50 X-Mailer: Gnus v5.4.9/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:9767 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9767 --Multipart_Sun_Feb__2_23:06:29_1997-1 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Sun_Feb__2_23:06:29_1997-1 Content-Type: text/plain; charset=US-ASCII --- 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. --Multipart_Sun_Feb__2_23:06:29_1997-1--