diff options
author | Austin Clements <amdragon@MIT.EDU> | 2014-08-04 21:45:20 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-08-05 08:07:27 -0300 |
commit | 3c1ad5bfa0039191f1202b0542eb3af7afd16c5c (patch) | |
tree | d6c8e22c4eda13d0c08c6f61d34887b603fccabd /emacs/notmuch-lib.el | |
parent | 36a59b466a18211d7164cd8078c5c1ddd0f2c278 (diff) |
emacs: Introduce notmuch-jump: shortcut keys to saved searches
This introduces notmuch-jump, which is like a user-friendly,
user-configurable global prefix map for saved searches. This provides
a non-modal and much faster way to access saved searches than
notmuch-hello.
A user configures shortcut keys in notmuch-saved-searches, which are
immediately accessible from anywhere in Notmuch under the "j" key (for
"jump"). When the user hits "j", the minibuffer immediately shows a
helpful table of bindings reminiscent of a completions buffer.
This code is a combination of work from myself (originally,
"notmuch-go"), David Edmondson, and modifications from Mark Walters.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r-- | emacs/notmuch-lib.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index c06baac0..19269e3c 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -25,6 +25,9 @@ (require 'mm-decode) (require 'cl) +(autoload 'notmuch-jump-search "notmuch-jump" + "Jump to a saved search by shortcut key." t) + (defgroup notmuch nil "Notmuch mail reader for Emacs." :group 'mail) @@ -138,6 +141,7 @@ For example, if you wanted to remove an \"inbox\" tag and add an (define-key map "m" 'notmuch-mua-new-mail) (define-key map "=" 'notmuch-refresh-this-buffer) (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) + (define-key map "j" 'notmuch-jump-search) map) "Keymap shared by all notmuch modes.") @@ -472,6 +476,15 @@ This replaces spaces, percents, and double quotes in STR with (setq list (cdr list))) (nreverse out))) +(defun notmuch-plist-delete (plist property) + (let* ((xplist (cons nil plist)) + (pred xplist)) + (while (cdr pred) + (when (eq (cadr pred) property) + (setcdr pred (cdddr pred))) + (setq pred (cddr pred))) + (cdr xplist))) + (defun notmuch-split-content-type (content-type) "Split content/type into 'content' and 'type'" (split-string content-type "/")) |