diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-08-09 18:19:21 -0400 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-08-09 18:19:21 -0400 |
commit | cf90552ab303fa2db1f6d8856ad6af07e56c4918 (patch) | |
tree | 3cd36e18c591725b273dbfc5df105d25d3aeaf9c /.fmail | |
parent | d0ad92c1c8b38800b10847e6ed04376d410b7cc3 (diff) | |
download | dotfiles-cf90552ab303fa2db1f6d8856ad6af07e56c4918.tar.gz |
fixed propagating the 'killed' tag
Diffstat (limited to '.fmail')
-rwxr-xr-x | .fmail/.notmuch/hooks/post-new | 6 | ||||
-rwxr-xr-x | .fmail/.notmuch/hooks/pre-new | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/.fmail/.notmuch/hooks/post-new b/.fmail/.notmuch/hooks/post-new index c8532d44..0c6f79e9 100755 --- a/.fmail/.notmuch/hooks/post-new +++ b/.fmail/.notmuch/hooks/post-new @@ -13,3 +13,9 @@ notmuch tag +spam -- folder:spam # mark all trash as trash notmuch tag +deleted -- folder:trash + +# propagate the 'killed' tag to all messages in the killed message's thread +killed_threads=$(notmuch search --output=threads tag:killed) +if [ ! -z "$killed_threads" ]; then + notmuch tag -unread -- $killed_threads +fi diff --git a/.fmail/.notmuch/hooks/pre-new b/.fmail/.notmuch/hooks/pre-new index 6af993dd..f06c597a 100755 --- a/.fmail/.notmuch/hooks/pre-new +++ b/.fmail/.notmuch/hooks/pre-new @@ -23,12 +23,6 @@ if [ ! -z "$floating_drafts" ]; then mdmv $floating_drafts $HOME/.fmail/drafts fi -# propagate the 'killed' tag to all messages in the killed message's thread -killed_threads=$(notmuch search --output=threads tag:killed) -if [ ! -z "$killed_threads" ]; then - notmuch tag -unread -- $killed_threads -fi - # ensure all spam is in the spam folder to train FastMail's spam filter floating_spam=$(notmuch search --output=files -- tag:spam and not folder:spam) if [ ! -z "$floating_spam" ]; then |