diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-06-10 10:45:14 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-06-10 10:45:14 +0100 |
commit | dd624af9c68ac3d4b14fec9cc59a07721851e0cd (patch) | |
tree | 7db21b99698d1c37e941528d47b0758a3fa3ae4b /.fmail | |
parent | 09de9ccadc92d819debdaadae80b35560f7e463a (diff) | |
download | dotfiles-dd624af9c68ac3d4b14fec9cc59a07721851e0cd.tar.gz |
ensure drafts are in drafts folder
Diffstat (limited to '.fmail')
-rwxr-xr-x | .fmail/.notmuch/hooks/post-new | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.fmail/.notmuch/hooks/post-new b/.fmail/.notmuch/hooks/post-new index 6d9c76c8..6cef2f96 100755 --- a/.fmail/.notmuch/hooks/post-new +++ b/.fmail/.notmuch/hooks/post-new @@ -3,6 +3,12 @@ # mark all sent mail as read notmuch tag -unread -- folder:sent +# ensure all drafts are in the drafts folder +floating_drafts=$(notmuch search --output=files -- tag:draft and not folder:drafts) +if [ ! -z "$floating_drafts" ]; then + mv $floating_drafts $HOME/.fmail/drafts/cur +fi + # mark all drafts as drafts, and as read notmuch tag -unread +draft -- folder:drafts |