X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=c792732ba5530b8db856cb77393c18600de0702a;hp=dee2279a0e860c70508df66d72d23be4b3b37684;hb=784649561abb627a9d81e4f718656dad0b6b6207;hpb=fda6416745b51450b6aa41dcd0d72df843fd3292 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index dee2279a..c792732b 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -161,6 +161,17 @@ name and addresses configured in the notmuch configuration file." (ido-completing-read "Send mail From: " collection nil 'confirm nil 'notmuch-mua-sender-history (car collection)))) +(defun notmuch-mua-new-mail (&optional prompt-for-sender) + "Invoke the notmuch mail composition window. + +If PROMPT-FOR-SENDER is non-nil, the user will be prompted for +the From: address first." + (interactive "P") + (let ((other-headers + (when prompt-for-sender + (list (cons 'from (notmuch-mua-prompt-for-sender)))))) + (notmuch-mua-mail nil nil other-headers))) + (defun notmuch-mua-send-and-exit (&optional arg) (interactive "P") (message-send-and-exit arg))