On Tue, Jul 10 2012, Sebastien Binet <binet@cern.ch> wrote: > ok. I thought using the post-new hook would have saved some i/o > resources over my current setup: > offlineimap.postsynchook = ~/emacs/notmuch-lib/notmuch-tag.sh > > where notmuch-tag.sh is (in pseudo-code): > ## > /usr/bin/notmuch new > > for tag,query in tag-queries: > tag_new $tag $query > > ## > > is there any advantage of using post-new compared to this setup ? The hooks are just there for convenience, and as Jani says, they're executed any time notmuch new is run, in any context. In your setup it looks like it would also save you having to maintain another script (notmuch-tag.sh) since that script in it's entirety could just be the post-new script, and the offlineimap.postsynchook could just execute notmuch new directly. jamie.