[PATCH v3 0/2] notmuch hooks

Jani Nikula jani at nikula.org
Wed Dec 7 11:42:33 PST 2011


On Tue, 06 Dec 2011 18:27:27 -0800, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
> On Tue,  6 Dec 2011 15:22:36 +0200, Jani Nikula <jani at nikula.org> wrote:
> > Hi all, this is v3 of the notmuch hooks patches. I think this is nearing
> > completion apart from final review and, most notably, tests.
> 
> Hey, Jani.  Thanks so much for these patches.  I think this is a really
> neat idea and it will be very useful.  I already know that this will cut
> out a lot of extraneous shell scripting that I'm relying on now.

Thanks for your interest!

> > I've been using this for some days now, and (subjective as it is) I have to say
> > I like offlineimap being run from notmuch new "pre-new" hook much better than
> > vice versa. Even more so for "post-new" tagging scripts.
> 
> I think the only thing that I was not particularly clear about is that I
> guess the "pre-new" and "post-new" scripts actually need to be scripts
> named "pre-new" and "post-new" in the hooks directory.  For some reason
> I didn't quite grok that from the help pages, and was confused if I
> needed to make a new "pre-new" subdirectory in the hooks directory or
> what.  I think just expecting a script at hook/pre-new is fine, but it
> maybe could be made a little more explicit in the documentation.

It's of course difficult for me to see this from someone else's point of
view, but IMHO all the relevant details can be found in the man page and
help.

> In fact, I think the best thing would actually be for notmuch new to
> make the .notmuch/hooks directory itself and to pre-fill it with "turned
> off" hook scripts that contain some useful comments on how to use them.
> This is what git does, and I think it's very handy, since it's all
> fairly self documenting.  The notmuch help could then just refer to the
> fact that they're there, and point people to the comments in the various
> scripts for how to use them.

This is a good idea, and complimentary to the documentation. I'll add
this. (I'll just have to come up with good samples. :o)

I wonder, though, whether the samples should be created only when
creating the database, or whenever the hooks directory does not exist?
The latter, I guess. Otherwise existing notmuch users would hardly get
the sample hooks.


BR,
Jani.


More information about the notmuch mailing list