X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=b64aeab94a4997053d09e5dc41969344af123d24;hb=2a6a0e248174d93f431018ce8b809fc0fdebd847;hp=274d7ec5591969ffda7269d2da98fc8b22754d77;hpb=e9394932f7ccf71755faed8965876e6869e0eacb;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 274d7ec5..b64aeab9 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -33,6 +33,27 @@ :type '(alist :key-type (string) :value-type (string)) :group 'notmuch) +(defcustom notmuch-search-oldest-first t + "Show the oldest mail first when searching." + :type 'boolean + :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 ()