]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: add support for stashing the thread id in show view
authorJani Nikula <jani@nikula.org>
Thu, 6 Dec 2012 22:48:05 +0000 (00:48 +0200)
committerDavid Bremner <bremner@debian.org>
Sun, 9 Dec 2012 23:09:46 +0000 (19:09 -0400)
Add a prefix argument to notmuch-show-stash-message-id to stash thread
id instead of message id.

emacs/notmuch-show.el

index 20f89970a00a7008fadf818e5873662c12c48c06..7d9f8a905f9103e378249069948c33709daca4dd 100644 (file)
@@ -1905,10 +1905,16 @@ thread from search."
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-from)))
 
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-from)))
 
-(defun notmuch-show-stash-message-id ()
-  "Copy id: query matching the current message to kill-ring."
-  (interactive)
-  (notmuch-common-do-stash (notmuch-show-get-message-id)))
+(defun notmuch-show-stash-message-id (&optional stash-thread-id)
+  "Copy id: query matching the current message to kill-ring.
+
+If invoked with a prefix argument (or STASH-THREAD-ID is
+non-nil), copy thread: query matching the current thread to
+kill-ring."
+  (interactive "P")
+  (if stash-thread-id
+      (notmuch-common-do-stash notmuch-show-thread-id)
+    (notmuch-common-do-stash (notmuch-show-get-message-id))))
 
 (defun notmuch-show-stash-message-id-stripped ()
   "Copy message ID of current message (sans `id:' prefix) to kill-ring."
 
 (defun notmuch-show-stash-message-id-stripped ()
   "Copy message ID of current message (sans `id:' prefix) to kill-ring."