X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=6130309ab73aa425387517c9ae2fbcf246946b4b;hb=9ca1f945d9f5030600dc14ffff10d4dad14db4ca;hp=3add992b46f1dbe4479f48576a77297b8d322da1;hpb=16b2db0986ce0ed7c420a69d0a98bb41e9ca4bd8;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 3add992b..6130309a 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -22,6 +22,7 @@ ;;; Code: (require 'cl-lib) +(require 'pcase) (require 'mm-util) (require 'mm-view) @@ -101,6 +102,7 @@ search results. Note that any filtered searches created by search." :type 'boolean :group 'notmuch-search) +(make-variable-buffer-local 'notmuch-search-oldest-first) (defcustom notmuch-poll-script nil "[Deprecated] Command to run to incorporate new mail into the notmuch database. @@ -247,7 +249,7 @@ displays both values separately." (let* ((val (notmuch-command-to-string "config" "get" item)) (len (length val))) ;; Trim off the trailing newline (if the value is empty or not - ;; configured, there will be no newline) + ;; configured, there will be no newline). (if (and (> len 0) (= (aref val (- len 1)) ?\n)) (substring val 0 -1) @@ -415,9 +417,9 @@ A command that supports a prefix argument can explicitly document its prefixed behavior by setting the 'notmuch-prefix-doc property of its command symbol." (interactive) - (let* ((mode major-mode) - (doc (substitute-command-keys - (notmuch-substitute-command-keys (documentation mode t))))) + (let ((doc (substitute-command-keys + (notmuch-substitute-command-keys + (documentation major-mode t))))) (with-current-buffer (generate-new-buffer "*notmuch-help*") (insert doc) (goto-char (point-min)) @@ -483,8 +485,8 @@ be displayed." ;;; String Utilities (defun notmuch-prettify-subject (subject) - ;; This function is used by `notmuch-search-process-filter' which - ;; requires that we not disrupt its' matching state. + ;; This function is used by `notmuch-search-process-filter', + ;; which requires that we not disrupt its matching state. (save-match-data (if (and subject (string-match "^[ \t]*$" subject))