From 603db659ecee227122855bdb959ab57cda37cc54 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 20 Apr 2021 17:24:37 +0100 Subject: notmuch: better saved searches --- email.org | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'email.org') diff --git a/email.org b/email.org index d70c141..52cb8d8 100644 --- a/email.org +++ b/email.org @@ -363,21 +363,28 @@ (defun jao--refresh-agenda () (save-window-excursion (org-agenda-list))) + (defun jao-notmuch-refresh-hello () + (interactive) + (notmuch-refresh-this-buffer) + (let ((inhibit-message t)) + (beginning-of-buffer) + (widget-forward 2))) + (with-eval-after-load "notmuch-hello" + (setq notmuch-saved-searches + `(,(jao-notmuch--q "bigml" "inbox" "bi") + ,@(jao-notmuch--mboxes-search "bigml" "inbox" "deploys") + ,(jao-notmuch--q "jao" "inbox" "ji") + ,@(jao-notmuch--mboxes-search "jao" "inbox") + ,@(jao-notmuch--mboxes-search "feeds") + ,(jao-notmuch--q "bml/today" nil "tb" '("tag:bigml" "date:1d..")) + ,(jao-notmuch--q "jao/today" nil "tj" '("tag:jao" "date:1d..")) + ,(jao-notmuch--q "toread" nil "r" '("tag:toread")))) (add-hook 'notmuch-hello-refresh-hook #'jao--refresh-agenda)) - (setq notmuch-saved-searches - `(,(jao-notmuch--q "jao" "inbox" "ji") - ,(jao-notmuch--q "bigml" "inbox" "bi") - ,@(jao-notmuch--mboxes-search "bigml" "inbox" "deploys") - ,@(jao-notmuch--mboxes-search "jao" "inbox") - ,@(jao-notmuch--mboxes-search "feeds") - ,(jao-notmuch--q "toread" nil "r" '("tag:toread")) - ,(jao-notmuch--q "bml/today" nil "tb" '("tag:bigml" "date:1d..")) - ,(jao-notmuch--q "jao/today" nil "tj" '("tag:jao" "date:1d.."))) - notmuch-hello-sections '(notmuch-hello-insert-saved-searches + (setq notmuch-hello-sections '(notmuch-hello-insert-saved-searches notmuch-hello-insert-alltags - notmuch-hello-insert-recent-searches + ;; notmuch-hello-insert-recent-searches notmuch-hello-insert-header) notmuch-hello-thousands-separator "," notmuch-hello-recent-searches-max 5 @@ -385,7 +392,7 @@ notmuch-show-logo nil notmuch-show-empty-saved-searches nil) #+end_src -*** commands +*** jumping from/to index #+begin_src emacs-lisp (defvar-local jao-notmuch--tree-buffer nil) -- cgit v1.2.3