From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54693 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Unable to delete "References:" lines Date: Thu, 06 Nov 2003 07:54:57 +0900 Organization: Emacsen advocacy group Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068072994 17698 80.91.224.253 (5 Nov 2003 22:56:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2003 22:56:34 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M3234@lists.math.uh.edu Wed Nov 05 23:56:32 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AHWZk-0004x7-00 for ; Wed, 05 Nov 2003 23:56:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AHWZ7-000854-00; Wed, 05 Nov 2003 16:55:53 -0600 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AHWYz-00084y-00 for ding@lists.math.uh.edu; Wed, 05 Nov 2003 16:55:45 -0600 Original-Received: from washington.hostforweb.net (washington.hostforweb.net [69.61.11.2]) by justine.libertine.org (Postfix) with ESMTP id 778E63A0067 for ; Wed, 5 Nov 2003 16:55:44 -0600 (CST) Original-Received: from yamaoka by washington.hostforweb.net with local (Exim 4.24) id 1AHWZ2-0003M4-BA; Wed, 05 Nov 2003 17:55:48 -0500 Original-To: Lloyd Zusman X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, linux) Cancel-Lock: sha1:dJLdNfvmvDeLPSm4V2Otjzkir2w= X-Payment: hashcash 1.2 0:031105:ljz@asfast.com:c91cccf67e522365 X-Hashcash: 0:031105:ljz@asfast.com:c91cccf67e522365 X-Payment: hashcash 1.2 0:031105:ding@gnus.org:206b15640c196f03 X-Hashcash: 0:031105:ding@gnus.org:206b15640c196f03 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32041 32041] / [47 12] X-AntiAbuse: Sender Address Domain - washington.hostforweb.net Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54693 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54693 >>>>> In >>>>> Lloyd Zusman wrote: > I presume this works because deleting the existing references causes > Gnus to assume that there are none to preserve, correct? Exactly. You can edit them (for example, delete except the last ID) and can also delete the header whole. >> (add-hook >> 'message-setup-hook >> (lambda nil >> ;; Generate the References header and clear the corresponding >> ;; elements in the `message-reply-headers' buffer-local variable. >> (let ((references (message-make-references)) >> reference) >> (if references >> (progn >> (mail-header-set-message-id message-reply-headers nil) >> (mail-header-set-references message-reply-headers nil) >> (setq references (split-string references)) >> (goto-char (point-min)) >> (insert "References: ") >> (while references >> (setq reference (car references) >> references (cdr references)) >> (if (> (+ (current-column) (length reference)) 78) >> (progn >> (delete-char -1) >> (insert "\n "))) >> (insert reference (if references >> " " >> "\n"))) >> (message-sort-headers)))))) -- Katsumi Yamaoka