]> git.notmuchmail.org Git - notmuch/blob - notmuch.el
05179150a9b7d7dbbaa02f980a462c4758e19afe
[notmuch] / notmuch.el
1 ; notmuch.el --- run notmuch within emacs
2 ;
3 ; Copyright © Carl Worth
4 ;
5 ; This file is part of Notmuch.
6 ;
7 ; Notmuch is free software: you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation, either version 3 of the License, or
10 ; (at your option) any later version.
11 ;
12 ; Notmuch is distributed in the hope that it will be useful, but
13 ; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 ; General Public License for more details.
16 ;
17 ; You should have received a copy of the GNU General Public License
18 ; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.
19 ;
20 ; Authors: Carl Worth <cworth@cworth.org>
21
22 ;;;###autoload
23 (defun notmuch-search-mode ()
24   "Major mode for handling the output of notmuch search"
25   (interactive)
26   (kill-all-local-variables)
27   (setq major-mode 'notmuch-search-mode
28         mode-name "notmuch-search")
29   (setq buffer-read-only t))
30
31 (defun notmuch ()
32   "Run notmuch to display all mail with tag of 'inbox'"
33   (interactive)
34   (require 'compile)
35   (compilation-start "notmuch search tag:inbox" 'notmuch-search-mode))