From 784649561abb627a9d81e4f718656dad0b6b6207 Mon Sep 17 00:00:00 2001 From: Thomas Jost Date: Thu, 26 May 2011 10:41:31 +0200 Subject: 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. --- emacs/notmuch-mua.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'emacs/notmuch-mua.el') 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)) -- cgit v1.2.3