aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2012-12-07 00:48:05 +0200
committerGravatar David Bremner <bremner@debian.org>2012-12-09 19:09:46 -0400
commit11a220a3c1b4c78d6fa994766a5e192d5619751e (patch)
tree7f66c5df0916d3d5ac600f6c1e3efd2cf81c76f0 /emacs
parent5c7990f2510e2783ba4d02ad893d712ef201336d (diff)
emacs: add support for stashing the thread id in show view
Add a prefix argument to notmuch-show-stash-message-id to stash thread id instead of message id.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-show.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 20f89970..7d9f8a90 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1905,10 +1905,16 @@ thread from search."
(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."