X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=e4b7e9d17848ce08c71bf245869e85234f9ad711;hb=bc9a58d75b2373467ff3727a97317ba5b803be67;hp=ac878a619d07e7c4947f1c359b9d6825580516b6;hpb=1ef7c75111b84ea19af3186ddc12f2ba434c93de;p=notmuch diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index ac878a61..e4b7e9d1 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -403,7 +403,7 @@ instead of `message-mode' and SWITCH-FUNCTION is mandatory." (defun notmuch-mua-mail (&optional to subject other-headers _continue switch-function yank-action send-actions - return-action &rest ignored) + return-action &rest _ignored) "Invoke the notmuch mail composition window. The position of point when the function returns differs depending @@ -416,11 +416,6 @@ moved to the \"To:\" header." (let ((user-agent (funcall notmuch-mua-user-agent-function))) (unless (string-empty-p user-agent) (push (cons 'User-Agent user-agent) other-headers)))) - (unless (assq 'From other-headers) - (push (cons 'From (message-make-from - (notmuch-user-name) - (notmuch-user-primary-email))) - other-headers)) (notmuch-mua-pop-to-buffer (message-buffer-name "mail" to) (or switch-function (notmuch-mua-get-switch-function))) @@ -439,6 +434,11 @@ moved to the \"To:\" header." ;; Cause `message-setup-1' to do things relevant for mail, ;; such as observe `message-default-mail-headers'. (message-this-is-mail t)) + (unless (assq 'From headers) + (push (cons 'From (message-make-from + (notmuch-user-name) + (notmuch-user-primary-email))) + headers)) (message-setup-1 headers yank-action send-actions return-action)) (notmuch-fcc-header-setup) (notmuch-mua--remove-dont-reply-to-names)