From 299874ce290b5619fd4a876143ee6ba18996d92d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 30 Oct 2009 15:12:49 -0700 Subject: [PATCH] notmuch-mode: Add an actualy notmuch-search-mode as well Doesn't really do anything so far other than mark the buffer read- only. This does have the benefit of giving us our own name rather than "Compilation" for the mode. --- notmuch-mode.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/notmuch-mode.el b/notmuch-mode.el index eec92044..450d4565 100644 --- a/notmuch-mode.el +++ b/notmuch-mode.el @@ -1,7 +1,16 @@ ; A mode for running notmuch within emacs +;;;###autoload +(defun notmuch-search-mode () + "Major mode for handling the output of notmuch search" + (interactive) + (kill-all-local-variables) + (setq major-mode 'notmuch-search-mode + mode-name "notmuch-search") + (setq buffer-read-only t)) + (defun notmuch () "Run notmuch to display all mail with tag of 'inbox'" (interactive) (require 'compile) - (compilation-start "notmuch search tag:inbox")) + (compilation-start "notmuch search tag:inbox" 'notmuch-search-mode)) -- 2.43.0