From: Carl Worth Date: Thu, 28 Oct 2010 01:44:05 +0000 (-0700) Subject: emacs: Eliminate duplicate From header in replies. X-Git-Tag: 0.4~41 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=6d93d2090d1546e631dbb28f562d7caa8be5b088 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. --- 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))