From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34497 Path: main.gmane.org!not-for-mail From: Karl Kleinpaste Newsgroups: gmane.emacs.gnus.general Subject: Re: Eliminating repetitious "Re: Re: Re: ..." Date: 31 Jan 2001 14:57:52 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: <5bzog761e2.fsf@avocet.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035170414 30745 80.91.224.250 (21 Oct 2002 03:20:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:20:14 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id 50E16D049E for ; Wed, 31 Jan 2001 15:03:21 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id NAC09711; Wed, 31 Jan 2001 13:58:33 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 31 Jan 2001 13:57:44 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA22160 for ; Wed, 31 Jan 2001 13:57:35 -0600 (CST) Original-Received: from cinnamon.vanillaknot.com (MESQUITE.SLIP.CS.CMU.EDU [128.2.207.11]) by mailhost.sclp.com (Postfix) with ESMTP id 900F8D049D for ; Wed, 31 Jan 2001 14:57:56 -0500 (EST) Original-Received: (from karl@localhost) by cinnamon.vanillaknot.com (8.9.3/8.9.3) id OAA05794; Wed, 31 Jan 2001 14:57:52 -0500 Original-To: ding@gnus.org X-Face: "5(T0tZd{6}pd~YzBG8O/*EW,.]6]@`m^e;fv65W^Y&=d"M\1H}>T~4_.kcDD.O~y3k)a6 hR;Nmi>9|>Nm${2IpM0^RcUEa\jcq?KOP)C&~x51l~zCHTulL^_T|u0I^kB'z@]{`2YjQu In-Reply-To: <5bzog761e2.fsf@avocet.cs.rochester.edu> (ShengHuo ZHU's message of "31 Jan 2001 13:07:49 -0500") User-Agent: Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.2 (Notus) Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 11 Xref: main.gmane.org gmane.emacs.gnus.general:34497 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34497 --=-=-= ShengHuo ZHU writes: > What if the header is > Subject: [foo] Re: [foo] Re: [foo] Re: the original subject Then the identifiers should be removed one at a time. Below is a new patch (from original source) which loops until no more identifiers are present, and then eliminates excess "Re: ". --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=diff Content-Description: updated nnmail Re: patch --- lisp/nnmail.el.~1~ Tue Jan 23 09:12:11 2001 +++ lisp/nnmail.el Wed Jan 31 14:09:26 2001 @@ -1096,10 +1096,14 @@ (mapconcat 'identity nnmail-list-identifiers " *\\|")))) (when regexp (goto-char (point-min)) - (when (re-search-forward - (concat "^Subject: +\\(Re: +\\)?\\(" regexp " *\\)") - nil t) - (delete-region (match-beginning 2) (match-end 0)))))) + (while (re-search-forward + (concat "^Subject: +\\(R[Ee]: +\\)*\\(" regexp " *\\)") + nil t) + (delete-region (match-beginning 2) (match-end 0)) + (beginning-of-line)) + (when (re-search-forward "^Subject: +\\(\\(R[Ee]: +\\)+\\)R[Ee]: +" nil t) + (delete-region (match-beginning 1) (match-end 1)) + (beginning-of-line))))) (defun nnmail-remove-tabs () "Translate TAB characters into SPACE characters." --=-=-=--