X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.el;h=84152fbccfebb14d55511a50d8fa759873c32d08;hp=3e4a30828ba8fee05b7c851beed85d4a29c55a86;hb=7e8ba9adf8198acf46f36913853c1af332467afe;hpb=ea97496081b8ffabce658463a2c6c847cdf02ea8 diff --git a/notmuch.el b/notmuch.el index 3e4a3082..84152fbc 100644 --- a/notmuch.el +++ b/notmuch.el @@ -40,8 +40,13 @@ mode-name "notmuch-search") (setq buffer-read-only t)) +(defun notmuch-search (query) + "Run \"notmuch search\" with the given query string and display results." + (interactive "sNotmuch search:") + (compilation-start (concat "notmuch search " query) 'notmuch-search-mode)) + (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" (interactive) (require 'compile) - (compilation-start "notmuch search tag:inbox" 'notmuch-search-mode)) + (notmuch-search "tag:inbox"))