From: Aneesh Kumar K.V <aneesh.ku...@gmail.com> Add key binding to do a reply-to sender. This is mapped to 'R'
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at gmail.com> --- emacs/notmuch.el | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 5b553bb..9ba1ec1 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -78,7 +78,8 @@ (define-key map "s" 'notmuch-search) (define-key map "m" 'message-mail) (define-key map "f" 'notmuch-show-forward-current) - (define-key map "r" 'notmuch-show-reply) + (define-key map "r" 'notmuch-show-reply-all) + (define-key map "R" 'notmuch-show-reply) (define-key map "|" 'notmuch-show-pipe-message) (define-key map "w" 'notmuch-show-save-attachments) (define-key map "V" 'notmuch-show-view-raw-message) @@ -446,12 +447,31 @@ buffer." (forward-line))) (message-mode)) -(defun notmuch-show-reply () +(defun notmuch-show-reply-all () "Begin composing a reply to the current message in a new buffer." (interactive) (let ((message-id (notmuch-show-get-message-id))) (notmuch-reply message-id))) + +(defun notmuch-recipient-reply (recipient query-string) + (switch-to-buffer (generate-new-buffer "notmuch-draft")) + (call-process notmuch-command nil t nil "reply" + (concat "--recipient=" recipient) query-string) + (message-insert-signature) + (goto-char (point-min)) + (if (re-search-forward "^$" nil t) + (progn + (insert "--text follows this line--") + (forward-line))) + (message-mode)) + +(defun notmuch-show-reply () + "Begin composing a reply to the current message in a new buffer." + (interactive) + (let ((message-id (notmuch-show-get-message-id))) + (notmuch-recipient-reply "sender" message-id))) + (defun notmuch-show-forward-current () "Forward the current message." (interactive) -- 1.7.0.2.157.gb7e7f