Gnus development mailing list
 help / color / mirror / Atom feed
From: Andreas Seltenreich <andreas+ding@gate450.dyndns.org>
To: ding@gnus.org
Subject: dysfunctional code in message-generate-headers
Date: Mon, 26 Mar 2007 22:07:26 +0200	[thread overview]
Message-ID: <87ejnblqf5.fsf@gate450.dyndns.org> (raw)
In-Reply-To: <gdk4d4-mrg.ln1@riesling.kuesterei.ch>

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

           reply	other threads:[~2007-03-26 20:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <gdk4d4-mrg.ln1@riesling.kuesterei.ch>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ejnblqf5.fsf@gate450.dyndns.org \
    --to=andreas+ding@gate450.dyndns.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).