X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=508ae764f54da45d7fd9919d058f92df89373d9f;hp=608c76d43138a4bdeafd35bb730ce7bc8bc36755;hb=1407e409b17d9e5c7a9660603fb3b975ca854d98;hpb=8f9bd26e6237a766499bcfc6cbdcad88d4e159b4 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.