[PATCH 2/2] emacs: tag-jump: make the same binding do the reverse tag change map
Mark Walters
markwalters1009 at gmail.com
Thu Oct 6 07:59:50 PDT 2016
Make the binding for going to the reverse tag change jump menu the
same as the binding to enter the tag-jump menu.
>From the way the tag-jump menu is setup it is relatively hard for the
user to configure this otherwise.
---
emacs/notmuch-tag.el | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 36a498d..3cdff9b 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -485,6 +485,8 @@ begin with a \"+\" or a \"-\". If REVERSE is non-nil, replace all
s)))
tags))
+(defvar notmuch-search-mode-map)
+
(defun notmuch-tag-jump (reverse)
"Create a jump menu for tagging operations.
@@ -523,11 +525,17 @@ and vice versa."
(push (list key name-string
`(lambda () (,tag-function ',tag-change)))
action-map)))
- (push (list "k" (if reverse
- "Forward tag changes "
- "Reverse tag changes")
- (apply-partially 'notmuch-tag-jump (not reverse)))
- action-map)
+
+ (let* ((binding (where-is-internal 'notmuch-tag-jump notmuch-search-mode-map 't))
+ (key (if (and (vectorp binding) (= (length binding) 1))
+ (string (elt binding 0))
+ "k")))
+ (push (list key
+ (if reverse
+ "Forward tag changes "
+ "Reverse tag changes")
+ (apply-partially 'notmuch-tag-jump (not reverse)))
+ action-map))
(setq action-map (nreverse action-map))
(notmuch-jump action-map "Tag: ")))
--
2.1.4
More information about the notmuch
mailing list