mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-25 10:54:52 +01:00
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*
This commit is contained in:
parent
b271763152
commit
1896ad9714
1 changed files with 9 additions and 7 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue