From 91bcd0a25bbe587dc3acca5b6b5764db35222aa7 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 28 Mar 2023 20:57:07 +0300 Subject: [PATCH] mu4e: restore support for function bookmarks Fixes 2446. --- mu4e/mu4e-bookmarks.el | 4 +--- mu4e/mu4e-search.el | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) 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))