]> git.notmuchmail.org Git - notmuch/blob - emacs/notmuch-lib.el
emacs: Add notmuch-hello.el, a friendly frontend to notmuch
[notmuch] / emacs / notmuch-lib.el
1 ;; notmuch-lib.el --- common variables, functions and function declarations
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 ;; This is an part of an emacs-based interface to the notmuch mail system.
23
24 (defvar notmuch-command "notmuch"
25   "Command to run the notmuch binary.")
26
27 (defgroup notmuch nil
28   "Notmuch mail reader for Emacs."
29   :group 'mail)
30
31 (defcustom notmuch-folders '(("inbox" . "tag:inbox") ("unread" . "tag:unread"))
32   "List of searches for the notmuch folder view"
33   :type '(alist :key-type (string) :value-type (string))
34   :group 'notmuch)
35
36 ;; XXX: This should be a generic function in emacs somewhere, not
37 ;; here.
38 (defun point-invisible-p ()
39   "Return whether the character at point is invisible.
40
41 Here visibility is determined by `buffer-invisibility-spec' and
42 the invisible property of any overlays for point. It doesn't have
43 anything to do with whether point is currently being displayed
44 within the current window."
45   (let ((prop (get-char-property (point) 'invisible)))
46     (if (eq buffer-invisibility-spec t)
47         prop
48       (or (memq prop buffer-invisibility-spec)
49           (assq prop buffer-invisibility-spec)))))
50
51 (provide 'notmuch-lib)