From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/22408 Path: main.gmane.org!not-for-mail From: Didier Verna Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] split group names with "\\n" in them Date: 12 Apr 1999 15:49:46 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035160333 29173 80.91.224.250 (21 Oct 2002 00:32:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:32:13 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA14629 for ; Mon, 12 Apr 1999 09:54:52 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id IAB28180; Mon, 12 Apr 1999 08:50:49 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 12 Apr 1999 08:50:51 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id IAA21142 for ; Mon, 12 Apr 1999 08:50:39 -0500 (CDT) Original-Received: from ulysse.enst.fr (23fdtoqX9ooTwb+ebpmaGUovFCVyNt3G@inf.enst.fr [137.194.2.81]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA14525 for ; Mon, 12 Apr 1999 09:50:30 -0400 (EDT) Original-Received: from metheny.enst.fr (sdH0RJ6n5m134j92F3yfgO/ZSehB/4mg@metheny.enst.fr [137.194.204.4]) by ulysse.enst.fr (8.8.8/8.8.8) with ESMTP id PAA16467 for ; Mon, 12 Apr 1999 15:49:50 +0200 (MET DST) Original-Received: (from verna@localhost) by metheny.enst.fr (8.8.8/8.8.8) id PAA09099; Mon, 12 Apr 1999 15:49:46 +0200 (MET DST) Original-To: Gnus Beta Testers X-Attribution: dv X-Url: http://www.infres.enst.fr/~verna X-Web: http://www.infres.enst.fr/~verna X-Home-Page: http://www.infres.enst.fr/~verna Mail-Copies-To: never X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D C6 X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj * 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