emacs: add mimetype completions to searches

This commit is contained in:
Mark Walters 2016-09-27 10:26:56 +01:00 committed by David Bremner
parent 297d091e1c
commit 385413e059

View file

@ -892,9 +892,10 @@ PROMPT is the string to prompt with."
(process-lines notmuch-command "search" "--output=tags" "*"))) (process-lines notmuch-command "search" "--output=tags" "*")))
(completions (completions
(append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:" (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:"
"subject:" "attachment:" "mimetype:") "subject:" "attachment:")
(mapcar (lambda (tag) (concat "tag:" tag)) all-tags) (mapcar (lambda (tag) (concat "tag:" tag)) all-tags)
(mapcar (lambda (tag) (concat "is:" tag)) all-tags)))) (mapcar (lambda (tag) (concat "is:" tag)) all-tags)
(mapcar (lambda (mimetype) (concat "mimetype:" mimetype)) (mailcap-mime-types)))))
(let ((keymap (copy-keymap minibuffer-local-map)) (let ((keymap (copy-keymap minibuffer-local-map))
(current-query (case major-mode (current-query (case major-mode
(notmuch-search-mode (notmuch-search-get-query)) (notmuch-search-mode (notmuch-search-get-query))