]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch.el: Add a binding ('r') to reply to the current message.
authorCarl Worth <cworth@cworth.org>
Wed, 11 Nov 2009 02:47:53 +0000 (18:47 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 11 Nov 2009 02:47:53 +0000 (18:47 -0800)
We were just starting to get "notmuch reply" into shape in order to
provide the needed functionality here, but then I realized that the
message-reply function built into emacs is already more functional,
(at least for the case of replying to a single message).

notmuch.el

index 34e439422cdb5415eba37638c0ff8f980b2b3cd6..608c76d43138a4bdeafd35bb730ce7bc8bc36755 100644 (file)
@@ -41,6 +41,7 @@
     (define-key map (kbd "C-n") 'notmuch-show-next-line)
     (define-key map (kbd "C-p") 'notmuch-show-previous-line)
     (define-key map "q" 'kill-this-buffer)
     (define-key map (kbd "C-n") 'notmuch-show-next-line)
     (define-key map (kbd "C-p") 'notmuch-show-previous-line)
     (define-key map "q" 'kill-this-buffer)
+    (define-key map "r" 'notmuch-show-reply)
     (define-key map "s" 'notmuch-show-toggle-signatures-visible)
     (define-key map "w" 'notmuch-show-view-raw-message)
     (define-key map "x" 'kill-this-buffer)
     (define-key map "s" 'notmuch-show-toggle-signatures-visible)
     (define-key map "w" 'notmuch-show-view-raw-message)
     (define-key map "x" 'kill-this-buffer)
@@ -221,6 +222,14 @@ buffer."
   (interactive)
   (view-file (notmuch-show-get-filename)))
 
   (interactive)
   (view-file (notmuch-show-get-filename)))
 
+(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)))
+
 (defun notmuch-show-pipe-message (command)
   "Pipe the contents of the current message to the given command.
 
 (defun notmuch-show-pipe-message (command)
   "Pipe the contents of the current message to the given command.