From 6d93d2090d1546e631dbb28f562d7caa8be5b088 Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Wed, 27 Oct 2010 18:44:05 -0700
Subject: [PATCH] emacs: Eliminate duplicate From header in replies.

The original code was intended to work, but clearly wasn't tested. Use
mail-header (as in existing code) to extract a header from a header alist.

This fixes the duplicate-from-line bug that is exercised by the test
just added to the test suite.
---
 emacs/notmuch-mua.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index ddaec676..dc7b386f 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -126,7 +126,7 @@ list."
       (when (not (string= "" user-agent))
 	(push (cons "User-Agent" user-agent) other-headers))))
 
-  (unless (assoc "From" other-headers)
+  (unless (mail-header 'from other-headers)
     (push (cons "From" (concat
 			(notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
 
-- 
2.45.2