From 9d0f59a5772c34d16e9a6944143bd1266906a766 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 11 Mar 2014 22:10:40 -0400 Subject: add a post-new hook to notmuch to handle tagging --- .gitignore | 2 ++ Makefile | 6 +++++- notmuch/hooks/post-new | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 notmuch/hooks/post-new diff --git a/.gitignore b/.gitignore index c421674..86bb8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ /mutt/aliases /mutt/cache /mutt/extra +/notmuch +!/notmuch/hooks/post-new /offlineimap !/offlineimap/pass.py /pentadactyl/info diff --git a/Makefile b/Makefile index 4383a1d..c0c0225 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ RM = @rm -f build : $(BUILD) -install : build $(INSTALLED) /var/spool/cron/$(USER) +install : build $(INSTALLED) /var/spool/cron/$(USER) $(INTO)/Maildir/.notmuch @for dir in $(EMPTYDIRS); do mkdir -p $(INTO)/$$dir; done $(ECHO) Installed into $(INTO) @@ -96,6 +96,10 @@ fortune/%.dat : fortune/% vim/bundle/vimproc/autoload/vimproc_unix.so : vim/bundle/vimproc/autoload/proc.c cd vim/bundle/vimproc && make +$(INTO)/Maildir/.notmuch: notmuch + @[ ! -e $@ ] || [ -h $@ ] || mv -f $@ $@.bak + $(LN) $(PWD)/$< $@ + %.spl : % @vim -u NONE -c':mkspell! $< | :q' diff --git a/notmuch/hooks/post-new b/notmuch/hooks/post-new new file mode 100755 index 0000000..ed6f9dc --- /dev/null +++ b/notmuch/hooks/post-new @@ -0,0 +1,4 @@ +#!/bin/sh + +notmuch tag +spam -- tag:new and folder:spam +notmuch tag -new -- tag:new -- cgit v1.2.3-54-g00ecf