X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=6c0bc1bcae0ed9e3f423e9ccdb860484b4e18111;hb=cd8cb607332b143bd5403175bed5fabe0f793b9c;hp=233c784d9a0676733903b9562247b1575fb02cdb;hpb=31fc76b782c5ebc38ec4a6d5f4fea12fe141f460;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 233c784d..6c0bc1bc 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -61,6 +61,10 @@ (require 'notmuch-message) (require 'notmuch-parser) +(unless (require 'notmuch-version nil t) + (defconst notmuch-emacs-version "unknown" + "Placeholder variable when notmuch-version.el[c] is not available.")) + (defcustom notmuch-search-result-format `(("date" . "%12s ") ("count" . "%-7s ") @@ -823,14 +827,14 @@ See `notmuch-tag' for information on the format of TAG-CHANGES." (let (longest (longest-length 0)) (loop for tuple in notmuch-saved-searches - if (let ((quoted-query (regexp-quote (cdr tuple)))) + if (let ((quoted-query (regexp-quote (notmuch-saved-search-get tuple :query)))) (and (string-match (concat "^" quoted-query) query) (> (length (match-string 0 query)) longest-length))) do (setq longest tuple)) longest)) - (saved-search-name (car saved-search)) - (saved-search-query (cdr saved-search))) + (saved-search-name (notmuch-saved-search-get saved-search :name)) + (saved-search-query (notmuch-saved-search-get saved-search :query))) (cond ((and saved-search (equal saved-search-query query)) ;; Query is the same as saved search (ignoring case) (concat "*notmuch-saved-search-" saved-search-name "*"))