Gnus development mailing list
 help / color / mirror / Atom feed
* dysfunctional code in message-generate-headers
       [not found] ` <gdk4d4-mrg.ln1@riesling.kuesterei.ch>
@ 2007-03-26 20:07   ` Andreas Seltenreich
  0 siblings, 0 replies; only message in thread
From: Andreas Seltenreich @ 2007-03-26 20:07 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

Hi,

there's some discussion in de.comm.software.gnus about an unintuitive
behavior of Message.  Currently, a "References" header that was
inserted on buffer creation and deleted by the user is inserted again
when the mail is being sent.  There's also an older bug report about
this: <news:87lkok9nnw.fsf@jidanni.org>.

Looking at the code, it seems that message-generate-headers already
has some provision to avoid repeated insertion.  However, the code
doesn't cause any effect at the moment, as it only puts /non-optional/
headers into message-inserted-headers, while the check to avoid
repeated insertion only applies to /optional/ ones.

This looks like a bug to me, and actually putting optional headers
into message-inserted-headers as in the attached patch results in the
behavior desired in the bug reports.

I'd like to propose this patch for No Gnus for now, since it
essentially enables an old feature for the first time.  WDYT?

regards,
andreas

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 448 bytes --]

*** message.el	15 Mar 2007 22:41:21 -0000	7.202
--- message.el	26 Mar 2007 00:37:08 -0000
***************
*** 5580,5585 ****
--- 5580,5586 ----
  		      (if formatter
  			  (funcall formatter header value)
  			(insert header-string ": " value))
+ 		      (push header-string message-inserted-headers)
  		      (goto-char (message-fill-field))
  		      ;; We check whether the value was ended by a
  		      ;; newline.  If not, we insert one.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-26 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <45fed62a$0$20297$9b4e6d93@newsspool3.arcor-online.net>
     [not found] ` <gdk4d4-mrg.ln1@riesling.kuesterei.ch>
2007-03-26 20:07   ` dysfunctional code in message-generate-headers Andreas Seltenreich

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).