diff options
| author | Charles Celerier <cceleri@cs.stanford.edu> | 2014-12-27 10:18:27 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-05-31 19:07:02 +0200 |
| commit | 1896ad97145ae27b2d5619b973d75afb774ca5b1 (patch) | |
| tree | d85ffa62c470d6ade4abc6ea498742d0260ebb06 | |
| parent | b271763152a5638b99cb282518ad1aa90fadbd9a (diff) | |
emacs: Added "is:<tag>" style completion to notmuch-read-query.
The notmuch-search-terms man page states that "tag:<tag>" is equivalent
to "is:<tag>". Completion for "is:<tag>" style searches is now supported
in the Emacs interface.
Amended by David Bremner: combine lexical-let and let into
lexical-let*
| -rw-r--r-- | emacs/notmuch.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el index ab004543..f03c2f90 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -855,13 +855,15 @@ See `notmuch-tag' for information on the format of TAG-CHANGES." "Read a notmuch-query from the minibuffer with completion. PROMPT is the string to prompt with." - (lexical-let - ((completions - (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" - "subject:" "attachment:" "mimetype:") - (mapcar (lambda (tag) - (concat "tag:" (notmuch-escape-boolean-term tag))) - (process-lines notmuch-command "search" "--output=tags" "*"))))) + (lexical-let* + ((all-tags + (mapcar (lambda (tag) (notmuch-escape-boolean-term tag)) + (process-lines notmuch-command "search" "--output=tags" "*"))) + (completions + (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" + "subject:" "attachment:" "mimetype:") + (mapcar (lambda (tag) (concat "tag:" tag)) all-tags) + (mapcar (lambda (tag) (concat "is:" tag)) all-tags)))) (let ((keymap (copy-keymap minibuffer-local-map)) (current-query (case major-mode (notmuch-search-mode (notmuch-search-get-query)) |
