summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-07-03 16:23:26 -0400
committerKyle Meyer <kyle@kyleam.com>2017-07-03 16:40:00 -0400
commitb017a1f12f0de76e9771fa9de5698e43e47af08c (patch)
tree32e9bd185cc3f896e6698171c6a3810975b2ee46
parent3e0155f4827c89b8c4fbc4878b147e7bf247ec30 (diff)
downloademacs.d-b017a1f12f0de76e9771fa9de5698e43e47af08c.tar.gz
Add custom notmuch-tree-from-show-current-query command
-rw-r--r--init.el3
-rw-r--r--lisp/km-mail.el7
2 files changed, 10 insertions, 0 deletions
diff --git a/init.el b/init.el
index d5804c8..7193e92 100644
--- a/init.el
+++ b/init.el
@@ -2171,6 +2171,9 @@
#'km/notmuch-show-pipe-part-to-project)
(define-key notmuch-show-mode-map [remap notmuch-show-pipe-message]
#'km/notmuch-show-pipe-message-to-project)
+ (define-key notmuch-show-mode-map
+ [remap notmuch-tree-from-show-current-query]
+ #'km/notmuch-tree-from-show-current-query)
(define-key notmuch-tree-mode-map [remap notmuch-show-pipe-message]
#'km/notmuch-show-pipe-message-to-project))
diff --git a/lisp/km-mail.el b/lisp/km-mail.el
index b25934c..772b3a4 100644
--- a/lisp/km-mail.el
+++ b/lisp/km-mail.el
@@ -58,6 +58,13 @@
(call-interactively #'notmuch-search-archive-thread))
;;;###autoload
+(defun km/notmuch-tree-from-show-current-query (&optional ignore-context)
+ (interactive "P")
+ (let ((notmuch-show-query-context (and (not ignore-context)
+ notmuch-show-query-context)))
+ (call-interactively #'notmuch-tree-from-show-current-query)))
+
+;;;###autoload
(defun km/notmuch-show-at-point ()
"Call `notmuch-show' with message or thread ID at point."
(interactive)