* Gnus 5.9.0 message.el removes needed headers
@ 2000-11-22 7:14 Colin Walters
2000-11-22 14:18 ` ShengHuo ZHU
0 siblings, 1 reply; 5+ messages in thread
From: Colin Walters @ 2000-11-22 7:14 UTC (permalink / raw)
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.
walters@meta:/usr/local/share/emacs/21.0.91/lisp/gnus$ diff -u message.el /usr/src/emacs-21.0.91/lisp/gnus/message.el
--- message.el Mon Nov 13 05:25:16 2000
+++ /usr/src/emacs-21.0.91/lisp/gnus/message.el Wed Nov 22 02:06:45 2000
@@ -2328,7 +2328,7 @@
(message-narrow-to-headers)
;; We (re)generate the Lines header.
(when (memq 'Lines message-required-mail-headers)
- (message-generate-headers '(Lines)))
+ (message-generate-headers message-required-mail-headers))
;; Remove some headers.
(message-remove-header message-ignored-mail-headers t)
(let ((mail-parse-charset message-default-charset))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus 5.9.0 message.el removes needed headers
2000-11-22 7:14 Gnus 5.9.0 message.el removes needed headers Colin Walters
@ 2000-11-22 14:18 ` ShengHuo ZHU
2000-11-22 16:02 ` Christopher Splinter
2000-11-22 16:14 ` Colin Walters
0 siblings, 2 replies; 5+ messages in thread
From: ShengHuo ZHU @ 2000-11-22 14:18 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
Colin Walters <walters@cis.ohio-state.edu> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: message-patch.diff --]
[-- Type: text/x-patch, Size: 891 bytes --]
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus 5.9.0 message.el removes needed headers
2000-11-22 14:18 ` ShengHuo ZHU
@ 2000-11-22 16:02 ` Christopher Splinter
2000-11-22 16:37 ` ShengHuo ZHU
2000-11-22 16:14 ` Colin Walters
1 sibling, 1 reply; 5+ messages in thread
From: Christopher Splinter @ 2000-11-22 16:02 UTC (permalink / raw)
* ShengHuo ZHU <zsh@cs.rochester.edu>:
[...]
> Thank you for the analysis. Try this patch.
This works for mail (thanks!) but not for news. Could you make
this change to `message-send-news', too?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus 5.9.0 message.el removes needed headers
2000-11-22 14:18 ` ShengHuo ZHU
2000-11-22 16:02 ` Christopher Splinter
@ 2000-11-22 16:14 ` Colin Walters
1 sibling, 0 replies; 5+ messages in thread
From: Colin Walters @ 2000-11-22 16:14 UTC (permalink / raw)
ShengHuo ZHU <zsh@cs.rochester.edu> writes:
> Thank you for the analysis. Try this patch.
Ah, that makes sense. It works.
Thanks, ShengHuo.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Gnus 5.9.0 message.el removes needed headers
2000-11-22 16:02 ` Christopher Splinter
@ 2000-11-22 16:37 ` ShengHuo ZHU
0 siblings, 0 replies; 5+ messages in thread
From: ShengHuo ZHU @ 2000-11-22 16:37 UTC (permalink / raw)
Christopher Splinter <chris@splinter.inka.de> writes:
> This works for mail (thanks!) but not for news. Could you make
> this change to `message-send-news', too?
Done.
ShengHuo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-11-22 16:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-22 7:14 Gnus 5.9.0 message.el removes needed headers Colin Walters
2000-11-22 14:18 ` ShengHuo ZHU
2000-11-22 16:02 ` Christopher Splinter
2000-11-22 16:37 ` ShengHuo ZHU
2000-11-22 16:14 ` Colin Walters
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).