From d9d8a503b791befb15a43c1a6e72b4b8d76fe1af Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 9 Jun 2021 06:00:35 +0100 Subject: tweaks --- email.org | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'email.org') diff --git a/email.org b/email.org index ceb2022..918d735 100644 --- a/email.org +++ b/email.org @@ -251,8 +251,7 @@ #+begin_src emacs-lisp (defun jao-list-mailboxes (base) (let ((dir (expand-file-name base "~/var/mail"))) - (seq-difference (directory-files dir) - '("." ".." "sent" "inbox" "trash")))) + (seq-difference (directory-files dir) '("." ".." "sent" "trash")))) #+end_src * consult narrowing #+begin_src emacs-lisp @@ -360,7 +359,7 @@ (defun jao-notmuch--q (d0 d1 &optional k qs st) (let ((q (or (when qs (mapconcat #'identity qs " AND ")) - (format "folder:%s/%s and tag:unread" d0 d1)))) + (format "folder:%s/%s and tag:\"/^(unread|new)$/\"" d0 d1)))) (list :name (concat d0 (when d1 "/") d1) :key k :query q :search-type (or st 'tree) :sort-order 'oldest-first))) @@ -375,8 +374,8 @@ (setq notmuch-saved-searches `(,(jao-notmuch--q "bigml" "inbox" "bi") ,@(jao-notmuch--mboxes-search "bigml" "inbox") - ,(jao-notmuch--q "jao" "inbox" "ji") - ,@(jao-notmuch--mboxes-search "jao" "inbox") + ,(jao-notmuch--q "bigml/support" nil "bs" '("tag:new" "tag:support")) + ,@(jao-notmuch--mboxes-search "jao") ,@(jao-notmuch--mboxes-search "feeds") ,(jao-notmuch--q "gmane/emacs" nil "e" '("tag:gmane" "tag:new" "tag:emacs")) @@ -408,7 +407,7 @@ notmuch-show-empty-saved-searches nil notmuch-show-part-button-default-action 'notmuch-show-view-part notmuch-show-mark-read-tags '("-new" "-unread") - notmuch-archive-tags '("+trove" "-new" "-unread" "-flagged") + notmuch-archive-tags '("+trove" "-new") notmuch-fcc-dirs '((".*@bigml.com" . "bigml/inbox +bigml +sent -new") (".*" . "jao/inbox +jao +sent -new")) @@ -541,7 +540,8 @@ (when-let ((n (or n (jao-notmuch--unread-count)))) (rename-buffer (format "*%s - {%s messages left}*" notmuch-tree-basic-query - n)))) + n)) + (jao-minibuffer-refresh))) (defun jao-notmuch-tree-next (thread &optional no-exit) "Next message or thread in forest or exit if none." @@ -765,16 +765,16 @@ notmuch tag +gmane -- tag:new AND folder:/gmane/ - for l in notmuch haskell emacs-devel emacs-diffs emacs; do + for l in geiser notmuch haskell erlang emacs-devel emacs-diffs emacs; do tag_list $l done tag_list emacs-bugs bug-gnu-emacs - + tag_list mailutils bug-mailutils #+end_src *** expiry shell script #+begin_src bash :shebang "#!/bin/bash" :tangle ./bin/notmuch-expire.sh :tangle-mode (identity #o755) - spared_tags="tag:\"/^(trove|new|flagged|unread|draft)$/\"" + spared_tags="tag:\"/^(trove|new|flagged|unread|draft|gmane)$/\"" function tag_deleted { notmuch tag +deleted -- "$1 AND date:..${2:-3d} AND NOT $spared_tags" @@ -787,7 +787,7 @@ tag_deleted_foldr "bigml.(drivel|lists|deploys|bugs)" 3d tag_deleted_foldr "bigml.reports" 1d tag_deleted_foldr "jao.(drivel|lists|books|think|local)" 3d - tag_deleted_foldr "feeds.+" 3d + tag_deleted "tag:feeds" 3d tag_deleted "tag:support AND tag:bigml" 7d -- cgit v1.2.3