]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
notmuch.c: Shorten version string
[notmuch] / emacs / notmuch.el
index be09f424a953c0686f552b7dd012ef5747b3d01a..8b153cc037e50bb21298d32ad64e550d701334cb 100644 (file)
@@ -773,8 +773,12 @@ search."
 Runs a new search matching only messages that match both the
 current search results AND the additional query string provided."
   (interactive "sFilter search: ")
-  (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query) (concat "( " query " )") query)))
-    (notmuch-search (concat notmuch-search-query-string " and " grouped-query) notmuch-search-oldest-first)))
+  (let ((grouped-query (if (string-match-p notmuch-search-disjunctive-regexp query)
+                          (concat "( " query " )")
+                        query)))
+    (notmuch-search (if (string= notmuch-search-query-string "*")
+                       grouped-query
+                     (concat notmuch-search-query-string " and " grouped-query)) notmuch-search-oldest-first)))
 
 (defun notmuch-search-filter-by-tag (tag)
   "Filter the current search results based on a single tag.