X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=47c74b9ef0a4323677000ec2591a85703120bf0f;hb=d6dea895884cdcb356f774197cdb9f7f8e2b5188;hp=cb9be30177013e7fc24783fc77091357043c801b;hpb=8cbb5114a20c1217f23977fd5edca99a0b7a2955;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index cb9be301..47c74b9e 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -24,6 +24,31 @@ (defvar notmuch-command "notmuch" "Command to run the notmuch binary.") +(defgroup notmuch nil + "Notmuch mail reader for Emacs." + :group 'mail) + +(defcustom notmuch-folders '(("inbox" . "tag:inbox") ("unread" . "tag:unread")) + "List of searches for the notmuch folder view" + :type '(alist :key-type (string) :value-type (string)) + :group 'notmuch) + +;; + +(defun notmuch-version () + "Return a string with the notmuch version number." + (let ((long-string + ;; Trim off the trailing newline. + (substring (shell-command-to-string + (concat notmuch-command " --version")) + 0 -1))) + (if (string-match "^notmuch\\( version\\)? \\(.*\\)$" + long-string) + (match-string 2 long-string) + "unknown"))) + +;; + ;; XXX: This should be a generic function in emacs somewhere, not ;; here. (defun point-invisible-p ()