]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
emacs: add mimetype completions to searches
[notmuch] / emacs / notmuch.el
index 888672b5af3e210f7e3290b635735f4d790f10a2..6c36ad8a9e4045182cda6a92b76fae2c4db52055 100644 (file)
@@ -892,9 +892,10 @@ PROMPT is the string to prompt with."
                 (process-lines notmuch-command "search" "--output=tags" "*")))
        (completions
         (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 "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))
          (current-query (case major-mode
                           (notmuch-search-mode (notmuch-search-get-query))