From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34491 Path: main.gmane.org!not-for-mail From: Karl Kleinpaste Newsgroups: gmane.emacs.gnus.general Subject: Eliminating repetitious "Re: Re: Re: ..." Date: 31 Jan 2001 09:31:42 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035170409 30716 80.91.224.250 (21 Oct 2002 03:20:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:20:09 +0000 (UTC) Keywords: subject,Re:,removal 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 3F121D049D for ; Wed, 31 Jan 2001 09:34:41 -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 IAC28937; Wed, 31 Jan 2001 08:32:10 -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 08:31:31 -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 IAA19471 for ; Wed, 31 Jan 2001 08:31:21 -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 8AC2AD049D for ; Wed, 31 Jan 2001 09:31:49 -0500 (EST) Original-Received: (from karl@localhost) by cinnamon.vanillaknot.com (8.9.3/8.9.3) id JAA29469; Wed, 31 Jan 2001 09:31:43 -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 User-Agent: Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.2 (Notus) Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 32 Xref: main.gmane.org gmane.emacs.gnus.general:34491 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34491 --=-=-= I want to repair this damage done to Subject lines, notably in mailing lists which have standard tokens in them. For example, and as I'm sure everyone knows, you get a mailing list which automatically prepends "[foo]" to every subject line if it is not already present: Subject: [foo] the original subject Normal followups to this, in the absence of other hackery, become: Subject: Re: [foo] the original subject Egroups and related list-support sites will leave this one alone, because the needed "[foo]" token is in place. But then we Gnusers come along, knowing that we don't need no steenkin' subject tokens, and so we strip them out: (setq nnmail-list-identifiers '("\\[foo]")) so that what we see is: Subject: the original subject and when we reply, we generate: Subject: Re: the original subject List handlers decide this is inadequate, so they re-append the token: Subject: [foo] Re: the original subject and then some non-Gnuser follows up, generating Subject: Re: [foo] Re: the original subject which the list-identifier-stripping Gnuser will subsequently see as: Subject: Re: Re: the original subject The patch below addresses this during nnmail-list-identifiers processing, detecting repeated occurrence of "Re: " and reducing it to just one. --karl --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=diff Content-Description: nnmail.el diff, removing excess \"Re: \" --- lisp/nnmail.el.~1~ Tue Jan 23 09:12:11 2001 +++ lisp/nnmail.el Wed Jan 31 09:30:30 2001 @@ -1097,9 +1097,12 @@ (when regexp (goto-char (point-min)) (when (re-search-forward - (concat "^Subject: +\\(Re: +\\)?\\(" regexp " *\\)") + (concat "^Subject: +\\(R[Ee]: +\\)?\\(" regexp " *\\)") nil t) - (delete-region (match-beginning 2) (match-end 0)))))) + (delete-region (match-beginning 2) (match-end 0))) + (goto-char (point-min)) + (when (re-search-forward "^Subject: +\\(R[Ee]: +\\)+R[Ee]: +" nil t) + (delete-region (match-beginning 1) (match-end 1)))))) (defun nnmail-remove-tabs () "Translate TAB characters into SPACE characters." --=-=-=--