From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64450 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: dysfunctional code in message-generate-headers Date: Mon, 26 Mar 2007 22:07:26 +0200 Message-ID: <87ejnblqf5.fsf@gate450.dyndns.org> References: <45fed62a$0$20297$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1174939723 26699 80.91.229.12 (26 Mar 2007 20:08:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2007 20:08:43 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M12974@lists.math.uh.edu Mon Mar 26 22:08:32 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1HVvUW-0000O2-58 for ding-account@gmane.org; Mon, 26 Mar 2007 22:08:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1HVvTc-0000CM-Dg; Mon, 26 Mar 2007 15:07:36 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1HVvTa-0000Bt-AY for ding@lists.math.uh.edu; Mon, 26 Mar 2007 15:07:34 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1HVvTU-0003dC-Db for ding@lists.math.uh.edu; Mon, 26 Mar 2007 15:07:34 -0500 Original-Received: from smtp2.rz.uni-karlsruhe.de ([129.13.185.218] ident=Debian-exim) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1HVvTT-0007DG-00 for ; Mon, 26 Mar 2007 22:07:27 +0200 Original-Received: from rzstud3.stud.uni-karlsruhe.de (rzstud3.stud.uni-karlsruhe.de [193.196.41.39]) by smtp2.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1HVvTT-0005y2-D8; Mon, 26 Mar 2007 22:07:27 +0200 Original-Received: from uwi7 by rzstud3.stud.uni-karlsruhe.de with local (Exim 4.43) id 1HVvTT-0000Rk-1X for ding@gnus.org; Mon, 26 Mar 2007 22:07:27 +0200 User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.96 (gnu/linux) X-Now-Playing: Katatonia =?utf-8?Q?=E2=99=AA?= Brave Murder Day =?utf-8?Q?=E2=99=AA?= Rainroom X-Hashcash: 1:24:070324:ding@gnus.org::kkU0rS+dwZx1iZKz:DCmj X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64450 Archived-At: --=-=-= 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: . 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline *** 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. --=-=-=--