]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: Introduce notmuch-jump: shortcut keys to saved searches
[notmuch] / emacs / notmuch-lib.el
index c06baac0e0c574737ed32e5013c599eb66e25a1a..19269e3c469b9adbf01776617d66bdf4974b1b86 100644 (file)
@@ -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 "/"))