From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: 3 bugs in Rmail Date: Tue, 11 Jan 2011 02:39:20 -0500 Message-ID: References: <8362twk3js.fsf@gnu.org> <78fwt0cr69.fsf@fencepost.gnu.org> <83wrmchyiq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294731586 10170 80.91.229.12 (11 Jan 2011 07:39:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 07:39:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 11 08:39:40 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcYpQ-0007rx-Nm for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 08:39:40 +0100 Original-Received: from localhost ([127.0.0.1]:40084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcYpP-0000Aw-Lo for ged-emacs-devel@m.gmane.org; Tue, 11 Jan 2011 02:39:39 -0500 Original-Received: from [140.186.70.92] (port=40227 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcYpF-0000Aq-3f for emacs-devel@gnu.org; Tue, 11 Jan 2011 02:39:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcYpD-0005lx-Uy for emacs-devel@gnu.org; Tue, 11 Jan 2011 02:39:29 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:37843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcYpD-0005lt-TQ for emacs-devel@gnu.org; Tue, 11 Jan 2011 02:39:27 -0500 Original-Received: from localhost ([127.0.0.1]:54642) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcYp8-0007xT-DW; Tue, 11 Jan 2011 02:39:22 -0500 X-Spook: Defcon LLNL MILSATCOM Zachawi DRM bootleg Compsec nitrate X-Ran: =el\C?E^?{S&aQ]>#=Bv'#Wo(Yx..yUf (Eli Zaretskii's message of "Tue\, 11 Jan 2011 06\:09\:33 +0200") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134434 Archived-At: >> * I want "To" listed before "CC" Turns out this is a message.el bug. rmail-start-mail calls compose-mail with OTHER-HEADERS = '(("in-reply-to" . ) ("cc" . ) ("references" . )) The doc of compose-mail says: OTHER-HEADERS is an alist specifying additional header fields. Elements look like (HEADER . VALUE) where both HEADER and VALUE are strings. ^^^^^^^^^^^ so rmail is doing the right thing. With message-user-agent, compose-mail calls message-mail. This however expects OTHER-HEADERS to have elements of the form (SYMBOL . VALUE). This is in contradiction to the doc of compose-mail. The funnt header order comes from the fact that message-mail passes the headers through to message-setup and message-setup-1. The latter basically inserts headers in the order specified by message-header-format-alist. Any elements not present in that list are inserted first. Since the elements of message-header-format-alist are symbols and the test is done with assq, the strings "cc" and "in-reply-to" are not found in that list and so end up being inserted first in the reply buffer.