aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-mua.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-10-27 16:58:44 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-10-27 17:04:48 -0700
commit36dcbdeff6de2612e70fe58bdbc6c5b979b0eafa (patch)
tree840cd377ad6982cb5c28105f9f7c90ff193262b5 /emacs/notmuch-mua.el
parenta3883a7e17171381b8b495ce6efd931c8f420c90 (diff)
emacs: Explicitly set the From address when composing a new message.
Previously, underlying emacs code was setting this header. Now, we do the right thing and query the notmuch configuration for the default value here.
Diffstat (limited to 'emacs/notmuch-mua.el')
-rw-r--r--emacs/notmuch-mua.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 0ad079ff..ddaec676 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -126,6 +126,10 @@ list."
(when (not (string= "" user-agent))
(push (cons "User-Agent" user-agent) other-headers))))
+ (unless (assoc "From" other-headers)
+ (push (cons "From" (concat
+ (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
+
(message-mail to subject other-headers continue
switch-function yank-action send-actions)
(message-sort-headers)