notmuch.el: Add notmuch-search command as well as notmuch

This allows for entering a query string interactively.
This commit is contained in:
Carl Worth 2009-10-30 17:18:19 -07:00
parent ea97496081
commit 7e8ba9adf8

View file

@ -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"))