From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33472 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus 5.9.0 message.el removes needed headers Date: 22 Nov 2000 09:18:17 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <2nvgtgm6om.fsf@tiger.jia.vnet> References: <87k89w32c5.fsf@meta.verbum.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="==-=-=" X-Trace: main.gmane.org 1035169572 25337 80.91.224.250 (21 Oct 2002 03:06:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:06:12 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id BAB75D049A for ; Wed, 22 Nov 2000 09:18:39 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id IAB20162; Wed, 22 Nov 2000 08:18:30 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 22 Nov 2000 08:17:51 -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 IAA28504 for ; Wed, 22 Nov 2000 08:17:41 -0600 (CST) Original-Received: from zsh.yi.org (d185fc155.rochester.rr.com [24.95.193.85]) by mailhost.sclp.com (Postfix) with ESMTP id 52A05D049A for ; Wed, 22 Nov 2000 09:18:01 -0500 (EST) Original-Received: (from zsh@localhost) by zsh.yi.org (8.10.0/8.10.0) id eAMEIHG25531; Wed, 22 Nov 2000 09:18:17 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: <87k89w32c5.fsf@meta.verbum.org> Original-Lines: 35 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33472 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33472 --==-=-= Colin Walters writes: > Hello, > > On "GNU Emacs 21.0.91.1 (i686-pc-linux-gnu, X toolkit) > of Sun 2000-11-19 on meta" > > when sending mail, message.el generates the headers here on line 2515: > > ;; Insert some headers. > (message-generate-headers message-required-news-headers) > > where the Message-ID, Lines, Date, etc are generated. Then, > message.el generates these headers again on line 2538: > > ;; We (re)generate the Lines header. > (when (memq 'Lines message-required-mail-headers) > (message-generate-headers '(Lines))) > > The comment by the second generation seems to say that only the Lines > header will be regenerated; in fact, all headers with the > 'message-deletable text property are deleted, including the > Message-ID, but are not restored, because only the '(Lines) header is > passed as a header to generate the second time. > > The following gross hack cures the symptoms, but I think message.el > should be fixed to not require the headers to be generated twice. Thank you for the analysis. Try this patch. ShengHuo --==-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=message-patch.diff Index: message.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 6.17 retrieving revision 6.18 diff -c -3 -r6.17 -r6.18 *** message.el 2000/11/20 01:17:58 6.17 --- message.el 2000/11/22 13:15:59 6.18 *************** *** 2370,2379 **** (set-buffer tembuf) (erase-buffer) ;; Avoid copying text props. ! (insert (format ! "%s" (save-excursion ! (set-buffer mailbuf) ! (buffer-string)))) ;; Remove some headers. (message-encode-message-body) (save-restriction --- 2370,2377 ---- (set-buffer tembuf) (erase-buffer) ;; Avoid copying text props. ! (insert (with-current-buffer mailbuf ! (buffer-substring-no-properties (point-min) (point-max)))) ;; Remove some headers. (message-encode-message-body) (save-restriction --==-=-=--