aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-11 21:37:35 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-11 21:37:35 -0800
commit1407e409b17d9e5c7a9660603fb3b975ca854d98 (patch)
tree1ed0201049827d4bb69718c4b1a26dd9ce2523f7 /notmuch.el
parent8f9bd26e6237a766499bcfc6cbdcad88d4e159b4 (diff)
notmuch.el: Switch to using "notmuch reply" rather than message-reply.
This way we get to take advantage of the configuration of the user's email addresses in notmuch, (rather than expecting the user to configure all of their email addresses in message mode as well).
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/notmuch.el b/notmuch.el
index 608c76d4..508ae764 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -225,10 +225,15 @@ buffer."
(defun notmuch-show-reply ()
"Begin composing a reply to the current message in a new buffer."
(interactive)
- (view-file (notmuch-show-get-filename))
- (let ((buf (current-buffer)))
- (message-reply)
- (kill-buffer buf)))
+ (let ((message-id (notmuch-show-get-message-id)))
+ (switch-to-buffer (generate-new-buffer "notmuch-draft"))
+ (call-process "notmuch" nil t nil "reply" message-id)
+ (goto-char (point-min))
+ (if (re-search-forward "^$" nil t)
+ (progn
+ (insert "--text follows this line--")
+ (forward-line)))
+ (message-mode)))
(defun notmuch-show-pipe-message (command)
"Pipe the contents of the current message to the given command.