From b9ac9409940f259cc1329f2b99b5b4fa04279e66 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 4 Nov 2025 23:58:49 +0000 Subject: notmuch: fix for notmuch-jump-search --- custom/jao-custom-notmuch.el | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 9d5fc0c..2731fe2 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -4,14 +4,6 @@ (defvar jao-notmuch-minibuffer-queries `((:name "" :query "tag:new and not tag:draft" :face jao-themes-f00) - (:name "B" :query "tag:new and tag:bigml and tag:inbox" :face default) - (:name "A" :query "tag:new and tag:alba" :face default) - (:name "b" :query "tag:new and tag:bigml and tag:bugs" - :face jao-themes-error) - (:name "S" :query "tag:new and tag:bigml and tag:support" :face default) - (:name "W" - :query "tag:new and tag:bigml and not tag:\"/support|bugs|inbox/\"" - :face default) (:name "I" :query "tag:new and tag:jao and tag:inbox" :face jao-themes-warning) (:name "W" :query "tag:new and tag:jao and tag:write" @@ -87,13 +79,15 @@ (widget-insert (propertize title 'face 'jao-themes-f00)) (notmuch-hello-insert-buttons searches)))) -(defmacro jao-notmuch-def-searches (name searches) +(defmacro jao-notmuch-def-searches (name searches &optional no-save) (declare (indent 1)) (let ((name (and name (format "%s" name))) (id (intern (format "jao-notmuch-%s-searches" (or name (gensym)))))) `(progn (defvar ,id ,searches) (defun ,id () (jao-notmuch-hello--insert-searches ,id ,name)) - (setq notmuch-saved-searches (append notmuch-saved-searches ,id)) + ,@(unless no-save + `((setq notmuch-saved-searches + (append notmuch-saved-searches ,id)))) (add-to-list 'notmuch-hello-sections ',id t)))) (setq notmuch-hello-sections nil notmuch-saved-searches nil) @@ -142,7 +136,8 @@ '("philosophy" "math" "physics" "sci" "gr-qc" "quant-ph"))) (jao-notmuch-def-searches flags - (jao-notmuch-widen-searches notmuch-saved-searches " AND tag:flagged")) + (jao-notmuch-widen-searches notmuch-saved-searches " AND tag:flagged") + t) (jao-notmuch-def-searches nil `(,(jao-notmuch--q "bml" "flagged" "rb" '("tag:flagged" "tag:bigml")) -- cgit v1.2.3