post-new [was: Re: query on a subset of messages ?]
Jameson Graef Rollins
jrollins at finestructure.net
Tue Jul 10 09:48:17 PDT 2012
On Tue, Jul 10 2012, Sebastien Binet <binet at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120710/f68c2784/attachment.pgp>
More information about the notmuch
mailing list