* [PATCH] split group names with "\\n" in them
@ 1999-04-12 13:49 Didier Verna
0 siblings, 0 replies; only message in thread
From: Didier Verna @ 1999-04-12 13:49 UTC (permalink / raw)
I've found the problem that I reported earlier (where groups
containing \\n in their names generated a bogus mail:n group). The reason is
that nnmail-article-group passes non expanded group names to the functions
that update the active file. The following patch fixes it.
1999-04-12 Didier Verna <verna@inf.enst.fr>
* nnmail.el (nnmail-article-group): in case of a group name
containing "\\n" constructs, be sure to pass the expanded value to
nn*-save-mail.
--- nnmail.el.old Mon Apr 12 15:37:58 1999
+++ nnmail.el Mon Apr 12 15:30:35 1999
@@ -856,7 +856,7 @@
(let ((methods nnmail-split-methods)
(obuf (current-buffer))
(beg (point-min))
- end group-art method regrepp)
+ end group-art method grp)
(if (and (sequencep methods)
(= (length methods) 1))
;; If there is only just one group to put everything in, we
@@ -923,25 +923,24 @@
(not group-art)))
(goto-char (point-max))
(setq method (pop methods)
- regrepp nil)
+ grp (car method))
(if (or methods
(not (equal "" (nth 1 method))))
(when (and
(ignore-errors
(if (stringp (nth 1 method))
- (progn
- (setq regrepp
- (string-match "\\\\[0-9&]" (car method)))
- (re-search-backward (cadr method) nil t))
+ (let ((expand (string-match "\\\\[0-9&]" grp))
+ (pos (re-search-backward (cadr method)
+ nil t)))
+ (and expand
+ (setq grp (nnmail-expand-newtext grp)))
+ pos)
;; Function to say whether this is a match.
- (funcall (nth 1 method) (car method))))
+ (funcall (nth 1 method) grp)))
;; Don't enter the article into the same
;; group twice.
- (not (assoc (car method) group-art)))
- (push (cons (if regrepp
- (nnmail-expand-newtext (car method))
- (car method))
- (funcall func (car method)))
+ (not (assoc grp group-art)))
+ (push (cons grp (funcall func grp))
group-art))
;; This is the final group, which is used as a
;; catch-all.
@@ -1375,9 +1374,9 @@
(list
:predicate
`(lambda (file)
- (string-match
+ (string-match
,(concat
- (regexp-quote (concat group suffix))
+ (regexp-quote (concat group suffix))
"$")
file)))))))
(when nnmail-fetched-sources
--
/ / _ _ Didier Verna http://www.inf.enst.fr/~verna/
- / / - / / /_/ / E.N.S.T. INF C201.1 mailto:verna@inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. (33) 01 45 81 73 46
75634 Paris cedex 13 Fax. (33) 01 45 81 31 19
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-04-12 13:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-12 13:49 [PATCH] split group names with "\\n" in them Didier Verna
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).