aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-mua.el
diff options
context:
space:
mode:
authorGravatar Thomas Jost <schnouki@schnouki.net>2011-05-26 10:41:32 +0200
committerGravatar Carl Worth <cworth@cworth.org>2011-05-26 10:34:45 -0700
commit1a8aae6fa7be108819fa848df3dc98e1840f5eba (patch)
tree098e86ad3fe9fb8086dfe7bbba98243e2214105e /emacs/notmuch-mua.el
parent784649561abb627a9d81e4f718656dad0b6b6207 (diff)
emacs: Allow the user to choose the "From" address when forwarding a message
When pressing C-u f, the user will be prompted for the identity to use.
Diffstat (limited to 'emacs/notmuch-mua.el')
-rw-r--r--emacs/notmuch-mua.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index c792732b..7b0aa315 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -172,6 +172,20 @@ the From: address first."
(list (cons 'from (notmuch-mua-prompt-for-sender))))))
(notmuch-mua-mail nil nil other-headers)))
+(defun notmuch-mua-new-forward-message (&optional prompt-for-sender)
+ "Invoke the notmuch message forwarding window.
+
+If PROMPT-FOR-SENDER is non-nil, the user will be prompted for
+the From: address first."
+ (interactive "P")
+ (if prompt-for-sender
+ (let* ((sender (notmuch-mua-prompt-for-sender))
+ (address-components (mail-extract-address-components sender))
+ (user-full-name (car address-components))
+ (user-mail-address (cadr address-components)))
+ (notmuch-mua-forward-message))
+ (notmuch-mua-forward-message)))
+
(defun notmuch-mua-send-and-exit (&optional arg)
(interactive "P")
(message-send-and-exit arg))