summaryrefslogtreecommitdiff
path: root/.fmail
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-02-22 15:45:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-02-22 15:46:12 -0700
commit51e629b3c4cee5ec362f2a8e7f8ba05a04066971 (patch)
tree8fe65140d5cad39a3e4a04da937afa82a0d8fc6a /.fmail
parentf5509ceee608e1fdd92f2b1992acb5c4f2fbef05 (diff)
downloaddotfiles-51e629b3c4cee5ec362f2a8e7f8ba05a04066971.tar.gz
amalgamate two markings as read, for speed
Diffstat (limited to '.fmail')
-rwxr-xr-x.fmail/.notmuch/hooks/post-new12
1 files changed, 6 insertions, 6 deletions
diff --git a/.fmail/.notmuch/hooks/post-new b/.fmail/.notmuch/hooks/post-new
index c3df260d..1cf7b169 100755
--- a/.fmail/.notmuch/hooks/post-new
+++ b/.fmail/.notmuch/hooks/post-new
@@ -6,7 +6,12 @@
# copies of the mail in other folders actually get their maildir Seen
# flag added. This is a bug in notmuch; see id:87r1ypsb1p.fsf@tethera.net
notmuch tag +unread -- folder:sent
-notmuch tag -unread -- folder:sent
+
+[ -r "$HOME/doc/conf/killfile" ] && perl \
+ -we'length and
+ system "notmuch", "tag", "-unread", "--", "folder:sent or ($_)"
+ for join ") or (", grep length, map s/^\s+|\s*(#.*)?$//gr, <>' \
+ "$HOME/doc/conf/killfile"
# mark all drafts as drafts, and as read
notmuch tag -unread +draft -- folder:drafts
@@ -16,8 +21,3 @@ notmuch tag +spam -- folder:spam
# mark all trash as trash
notmuch tag +deleted -- folder:trash
-
-[ -r "$HOME/doc/conf/killfile" ] && perl \
- -we'length and system "notmuch", "tag", "-unread", "--", "($_)"
- for join ") or (", grep length, map s/^\s+|\s*(#.*)?$//gr, <>' \
- "$HOME/doc/conf/killfile"