summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-07 04:58:34 +0100
committerjao <jao@gnu.org>2021-06-07 04:58:34 +0100
commitbc2a199ea92b1ba3fed47414c74540e49412b021 (patch)
treedcb72733828395cccbbf8ba8b2b96a1cac9743fb /email.org
parent41ad6a68037bad0765b735e97e7ae612afc0ccfc (diff)
downloadelibs-bc2a199ea92b1ba3fed47414c74540e49412b021.tar.gz
elibs-bc2a199ea92b1ba3fed47414c74540e49412b021.tar.bz2
more notmuch tagging rules
Diffstat (limited to 'email.org')
-rw-r--r--email.org31
1 files changed, 20 insertions, 11 deletions
diff --git a/email.org b/email.org
index a2f5bd6..e2a07fb 100644
--- a/email.org
+++ b/email.org
@@ -489,9 +489,10 @@
(let ((p) (cnt))
(while (setq p (text-property-search-forward
:notmuch-message-properties))
+ (unless cnt (setq cnt 0))
(let ((tags (plist-get (prop-match-value p) :tags)))
(when (or (member "unread" tags) (member "new" tags))
- (setq cnt (1+ (or cnt 0))))))
+ (setq cnt (1+ cnt)))))
cnt)))
(defun jao-notmuch-tree-update-buffer-name (&optional n)
@@ -722,26 +723,34 @@
tag_directory jao
tag_directory feeds
+ nbml="tag:new AND tag:bigml AND"
+
notmuch tag +bug -lists -drivel \
- -- "tag:new AND tag:bigml AND (List:bigmlcom/wintermute OR List:bigmlcom/universe)"
+ -- "$nbml (List:bigmlcom/wintermute OR List:bigmlcom/universe)"
+ notmuch tag +support -inbox -drivel -lists \
+ -- "$nbml (List:support OR List:education)"
notmuch tag +gmane -- tag:new AND folder:/gmane/
#+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)$/\""
+
function tag_deleted {
- notmuch tag +deleted -- \
- "folder:\"/$1/\"" AND date:..${2:-3d} \
- AND NOT "tag:\"/^(trove|new|flagged|unread|draft)$/\""
+ notmuch tag +deleted -- "$1 AND date:..${2:-3d} AND NOT $spared_tags"
+ }
+
+ function tag_deleted_foldr {
+ tag_deleted "folder:\"/$1/\"" $2
}
- tag_deleted "bigml.(drivel|lists|deploys|bugs)" 3d
- tag_deleted "bigml.reports" 1d
- tag_deleted "bigml.support$" 7d
- tag_deleted "jao.(drivel|lists|books|think|local)" 3d
- tag_deleted "feeds.+" 3d
+ 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
- notmuch tag +deleted +trash -new -unread -- "folder:trash and tag:new"
+ tag_deleted "tag:support AND tag:bigml" 7d
notmuch new > $HOME/var/log/notmuch-expire.log 2>&1
notmuch compact >> $HOME/var/log/notmuch-expire.log 2>&1