Re: post-new [was: Re: query on a subset of messages ?]

Subject: Re: post-new [was: Re: query on a subset of messages ?]

Date: Tue, 10 Jul 2012 09:48:17 -0700

To: Sebastien Binet, Jani Nikula

Cc: Notmuch Mail

From: Jameson Graef Rollins


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.
part-000.sig (application/pgp-signature)

Thread: