X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=notmuch.el;h=4f4a7c9c9f7e0b2a6b7e9fe32068beea844203b5;hb=eb1a5b441be77dc875a9b0fa578441dc52ad442d;hp=3e4a30828ba8fee05b7c851beed85d4a29c55a86;hpb=ea97496081b8ffabce658463a2c6c847cdf02ea8;p=notmuch diff --git a/notmuch.el b/notmuch.el index 3e4a3082..4f4a7c9c 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: ") + (start-process "notmuch-search" (concat "*notmuch-search-" query) "notmuch" "search" query)) + (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"))