]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
notmuch search: Add support for a --reverse option to reverse sort order.
[notmuch] / notmuch.el
index 34e439422cdb5415eba37638c0ff8f980b2b3cd6..d20c85ea8528be3f1fc4f4c7732b945a06ef855c 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 "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)
@@ -221,6 +222,19 @@ buffer."
   (interactive)
   (view-file (notmuch-show-get-filename)))
 
+(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)))
+    (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.
 
@@ -699,18 +713,6 @@ global search.
       (notmuch-search-markup-this-thread-id)
       (next-line))))
 
-(defun notmuch-search-hide-thread-ids ()
-  (interactive)
-  (add-to-invisibility-spec 'notmuch-search)
-  (force-window-update)
-  (redisplay t))
-
-(defun notmuch-search-show-thread-ids ()
-  (interactive)
-  (remove-from-invisibility-spec 'notmuch-search)
-  (force-window-update)
-  (redisplay t))
-
 (defun notmuch-search-show-thread ()
   (interactive)
   (let ((thread-id (notmuch-search-find-thread-id)))