From 46cbe710d85fe51c92132e20c93225eb124efbc7 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 16 Aug 2022 22:57:21 +0100 Subject: notmuch trove searches and other nits --- custom/jao-custom-notmuch.el | 17 +++++++++++++---- lib/net/jao-notmuch.el | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index bbabae2..2441942 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -122,12 +122,20 @@ ,(jao-notmuch--sq "emacs-diffs" "ec" "emacs" "diffs") ,(jao-notmuch--sq "emacs-orgmode" "eo" "emacs" "org"))) +(defvar jao-notmuch-trove-searches + (mapcar (lambda (m) (list :query (concat "tag:trove and tag:" m) + :name (concat "trove/" m) + :key (concat "t" (substring m 0 1)) + :search-type 'tree)) + '("feeds" "hacking" "bills" "jao"))) + (setq notmuch-saved-searches (append jao-notmuch-inbox-searches jao-notmuch-bigml-searches jao-notmuch-mark-searches jao-notmuch-feed-searches - jao-notmuch-emacs-searches)) + jao-notmuch-emacs-searches + jao-notmuch-trove-searches)) (defvar jao-notmuch-dynamic-searches `(,(jao-notmuch--q "bml" "today" "tb" '("tag:bigml" "date:24h..")) @@ -138,6 +146,7 @@ (defvar jao-notmuch-new-searches `(,(jao-notmuch--q "new" nil "nn" '("tag:new" "not tag:draft")) ,(jao-notmuch--q "unread" nil "nu" '("tag:unread")) + ,@jao-notmuch-trove-searches (:query "*" :name "messages"))) (defun jao-notmuch-tree-widen-search () @@ -212,7 +221,7 @@ notmuch-fcc-dirs '(("\\(support\\|education\\)@bigml.com" . nil) (".*@bigml.com" . "bigml/trove +bigml +sent -new -unread") - (".*" . "jao/trove +jao +sent +trove -new -unread")) + (".*" . "trove/jao +sent +trove -new -unread")) notmuch-maildir-use-notmuch-insert t) :config @@ -323,7 +332,7 @@ (use-package notmuch-hello :init - (setq notmuch-column-control t + (setq notmuch-column-control 1.0 notmuch-hello-sections '(jao-notmuch-hello-insert-bigml-searches jao-notmuch-hello-insert-inbox-searches jao-notmuch-hello-insert-feeds-searches @@ -503,7 +512,7 @@ (save-window-excursion (other-window -1) (derived-mode-p 'notmuch-hello-mode))) (delete-window) - (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 10))))) + (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 100))))) (advice-add 'notmuch-tree :before #'jao-notmuch-before-tree) (advice-add 'notmuch-tree-quit :after #'jao-notmuch-after-tree-quit) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index f2e87fc..db3751f 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -220,7 +220,6 @@ (with-current-buffer notmuch-tree-message-buffer (jao-notmuch--view-html)))))) - ;;; Keeping track of unread messages in current tree view (defun jao-notmuch--looking-at-new-p (&optional p) -- cgit v1.2.3