diff --git a/mu4e/mu4e-bookmarks.el b/mu4e/mu4e-bookmarks.el index c6a8947c..5cfc7a06 100644 --- a/mu4e/mu4e-bookmarks.el +++ b/mu4e/mu4e-bookmarks.el @@ -53,11 +53,9 @@ Each of the list elements is a plist with at least: `:name' - the name of the query -`:query' - the query expression string (not a function) +`:query' - the query expression string or function `:key' - the shortcut key (single character) -Note that the :query parameter can be a function/lambda. - Optionally, you can add the following: - `:favorite' - if t, monitor the results of this query, and make diff --git a/mu4e/mu4e-search.el b/mu4e/mu4e-search.el index 91ea88fc..c5eb12db 100644 --- a/mu4e/mu4e-search.el +++ b/mu4e/mu4e-search.el @@ -203,6 +203,7 @@ the search." (or expr (mu4e-ask-bookmark (if edit "Select bookmark: " "Bookmark: ")))) + (expr (if (functionp expr) (funcall expr) expr)) (fav (mu4e--bookmark-query (mu4e-bookmark-favorite)))) ;; reset baseline when searching for the favorite bookmark query (when (and fav (string= fav expr))