]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
emacs: have tag-completion return all tags for nil input
[notmuch] / emacs / notmuch.el
index f0afa0721628c8d53e7abfe3b8d4e603260d2892..ba833e642e82efc5a30a019b953f154f206e4feb 100644 (file)
@@ -85,11 +85,13 @@ For example:
 `notmuch-read-tag-changes' function.")
 
 (defun notmuch-tag-completions (&optional search-terms)
+  (if (null search-terms)
+      (setq search-terms (list "*")))
   (split-string
    (with-output-to-string
      (with-current-buffer standard-output
        (apply 'call-process notmuch-command nil t
-             nil "search-tags" search-terms)))
+             nil "search" "--output=tags" "--exclude=false" search-terms)))
    "\n+" t))
 
 (defun notmuch-select-tag-with-completion (prompt &rest search-terms)