diff options
author | Thomas Jost <schnouki@schnouki.net> | 2011-05-26 10:41:31 +0200 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2011-05-26 10:34:37 -0700 |
commit | 784649561abb627a9d81e4f718656dad0b6b6207 (patch) | |
tree | 1ee2e1add4b1f33dd6545f4cf865624c71b93da0 /emacs/notmuch-mua.el | |
parent | fda6416745b51450b6aa41dcd0d72df843fd3292 (diff) |
emacs: Allow the user to choose the "From" address when composing a new message
When pressing C-u m, the user will be prompted for the identity to use.
Diffstat (limited to 'emacs/notmuch-mua.el')
-rw-r--r-- | emacs/notmuch-mua.el | 11 |
1 files changed, 11 insertions, 0 deletions
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)) |