From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54694 Path: main.gmane.org!not-for-mail From: Lloyd Zusman Newsgroups: gmane.emacs.gnus.general Subject: Re: Unable to delete "References:" lines Date: Wed, 05 Nov 2003 19:50:07 -0500 Organization: FreeBSD/Linux Hippopotamus Preserve 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 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1068079860 31151 80.91.224.253 (6 Nov 2003 00:51:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2003 00:51:00 +0000 (UTC) Original-X-From: ding-owner+M3235@lists.math.uh.edu Thu Nov 06 01:50:58 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 1AHYMU-0002nL-00 for ; Thu, 06 Nov 2003 01:50:58 +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 1AHYLq-0008Rh-00; Wed, 05 Nov 2003 18:50:18 -0600 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AHYLi-0008RZ-00 for ding@lists.math.uh.edu; Wed, 05 Nov 2003 18:50:10 -0600 Original-Received: from asfast.net (hippo.asfast.net [216.182.10.250]) by justine.libertine.org (Postfix) with ESMTP id 5DB653A006D for ; Wed, 5 Nov 2003 18:50:09 -0600 (CST) Original-Received: from localhost (localhost [127.0.0.1]) (uid 0) by asfast.net with local; Wed, 05 Nov 2003 19:50:09 -0500 Original-To: ding@gnus.org X-Face: "!ga1s|?LNLE3MeeeEYs(%LIl9q[xV9!j4#xf4!**BFW_ihlOb;:Slb>)vy>CJM writes: >>>>>> 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. I understand. And I find it interesting that the message ID also has to be removed, or else this doesn't seem to work. >>> (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 -- Lloyd Zusman ljz@asfast.com