--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id C8B45431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id SG+sn24pCGau for <notmuch@notmuchmail.org>;\r
+ Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\r
+Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com\r
+ [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 0F933431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:12 -0700 (PDT)\r
+Received: by qadc11 with SMTP id c11so124027qad.5\r
+ for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 07:13:10 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+ :message-id:mime-version:content-type:x-gm-message-state;\r
+ bh=366vsB9IN8iXqjgp2BNCRN50x9e8I2V+HTvMft6/KBs=;\r
+ b=Ub4HUldc7zaHF/aYfWqOa9BDODUNVrW2Qr7qYFtwtjoV73uhjFIlDUKBTR5PDWbzqI\r
+ I14GQe3DaQIIVS0Tku600p4FT95kREO5+rQWLlSowInl52+IMs/RWXTDNxjsimd/x021\r
+ x8VicJ/c/OaFvV2san0BomuBiybXuDxfepFUgQMlFda4X7CzHkRA4jAExnE9xSkAar6m\r
+ pXqHGrwXpVHByfJbHcU4OI3to24keGRaj4X/WauYm6Tja6Ec3KnTeekC2ZKs72kc79Xm\r
+ gTnT5OIwNDnLzpThRwtQeVlD8YBW2+pHzXmc9v3a2NGgB7bYxJudU2Zr2mkDNeJuqdiW\r
+ DbPg==\r
+Received: by 10.229.77.36 with SMTP id e36mr12995489qck.138.1333030389983;\r
+ Thu, 29 Mar 2012 07:13:09 -0700 (PDT)\r
+Received: from localhost (nikula.org. [92.243.24.172])\r
+ by mx.google.com with ESMTPS id i19sm12578484qad.19.2012.03.29.07.13.07\r
+ (version=SSLv3 cipher=OTHER); Thu, 29 Mar 2012 07:13:08 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org\r
+Subject: Re: [BUG/PATCH] emacs: Fix header problem in reply for emacs 23.2\r
+In-Reply-To: <1332943338-9708-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <87obrh3ufi.fsf@nikula.org>\r
+ <1332943338-9708-1-git-send-email-awg+notmuch@xvx.ca>\r
+User-Agent: Notmuch/0.11.1+222~ga47a98c (http://notmuchmail.org) Emacs/23.1.1\r
+ (i686-pc-linux-gnu)\r
+Date: Thu, 29 Mar 2012 14:13:05 +0000\r
+Message-ID: <87398rebri.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQk6jZ5ER2Zxjiu7bOBVWE90A2WhSi0kMZrp2ODBPzxMtmV96LtgEV7B2iJCssv0ut9Ywp7I\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 29 Mar 2012 14:13:13 -0000\r
+\r
+On Wed, 28 Mar 2012 08:02:18 -0600, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\r
+> The new reply code used strings instead of symbols for header names,\r
+> which message-mail is OK with on emacs 23.3, but not 23.2. The symptom\r
+> is that on 23.2 (and presumably on earlier versions) the reply message\r
+> would end up with two of some headers.\r
+> \r
+> This fixes the problem by converting the header names to symbols of\r
+> the type message.el usually expects before passing the headers to\r
+> message-mail.\r
+\r
+The patch depends on some set of the other reply fixes (*), so I applied\r
+this on top of them. All tests pass with emacs 23.2.\r
+\r
+Unfortunately, the emacs UI fails with "Symbol's function definition is\r
+void: remove-if" when trying to reply. After a manual (require 'cl) the\r
+UI seems to otherwise work as expected. This is probably unrelated to\r
+this particular patch, but why is it a (eval-when-compile (require 'cl))\r
+and not (require 'cl) in notmuch-mua.el?\r
+\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+(*)\r
+id:"1332941635-21019-2-git-send-email-awg+notmuch@xvx.ca"\r
+id:"1332941635-21019-3-git-send-email-awg+notmuch@xvx.ca"\r
+id:"1332996818-15700-1-git-send-email-awg+notmuch@xvx.ca"\r
+\r
+> ---\r
+> emacs/notmuch-lib.el | 5 ++++-\r
+> emacs/notmuch-mua.el | 10 +++++-----\r
+> 2 files changed, 9 insertions(+), 6 deletions(-)\r
+> \r
+> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> index c146748..af46611 100644\r
+> --- a/emacs/notmuch-lib.el\r
+> +++ b/emacs/notmuch-lib.el\r
+> @@ -232,9 +232,12 @@ the given type."\r
+> (or (plist-get part :content)\r
+> (notmuch-get-bodypart-internal (concat "id:" (plist-get msg :id)) nth process-crypto)))\r
+> \r
+> +;; Converts a plist of headers to an alist of headers. The input plist should\r
+> +;; have symbols of the form :Header as keys, and the resulting alist will have\r
+> +;; symbols of the form 'Header as keys.\r
+> (defun notmuch-plist-to-alist (plist)\r
+> (loop for (key value . rest) on plist by #'cddr\r
+> - collect (cons (substring (symbol-name key) 1) value)))\r
+> + collect (cons (intern (substring (symbol-name key) 1)) value)))\r
+> \r
+> ;; Compatibility functions for versions of emacs before emacs 23.\r
+> ;;\r
+> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+> index 9805d79..24918d3 100644\r
+> --- a/emacs/notmuch-mua.el\r
+> +++ b/emacs/notmuch-mua.el\r
+> @@ -185,11 +185,11 @@ OTHER-ARGS are passed through to `message-mail'."\r
+> (when notmuch-mua-user-agent-function\r
+> (let ((user-agent (funcall notmuch-mua-user-agent-function)))\r
+> (when (not (string= "" user-agent))\r
+> - (push (cons "User-Agent" user-agent) other-headers))))\r
+> + (push (cons 'User-Agent user-agent) other-headers))))\r
+> \r
+> - (unless (assoc "From" other-headers)\r
+> - (push (cons "From" (concat\r
+> - (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
+> + (unless (assq 'From other-headers)\r
+> + (push (cons 'From (concat\r
+> + (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
+> \r
+> (apply #'message-mail to subject other-headers other-args)\r
+> (message-sort-headers)\r
+> @@ -250,7 +250,7 @@ the From: address first."\r
+> (interactive "P")\r
+> (let ((other-headers\r
+> (when (or prompt-for-sender notmuch-always-prompt-for-sender)\r
+> - (list (cons "From" (notmuch-mua-prompt-for-sender))))))\r
+> + (list (cons 'From (notmuch-mua-prompt-for-sender))))))\r
+> (notmuch-mua-mail nil nil other-headers)))\r
+> \r
+> (defun notmuch-mua-new-forward-message (&optional prompt-for-sender)\r
+> -- \r
+> 1.7.5.4\r
+> \r