Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4688A431FD0 for ; Wed, 7 Dec 2011 11:42:41 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Moh0EUi4ysLm for ; Wed, 7 Dec 2011 11:42:40 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 78AC5431FB6 for ; Wed, 7 Dec 2011 11:42:40 -0800 (PST) Received: by wgbds13 with SMTP id ds13so1468494wgb.2 for ; Wed, 07 Dec 2011 11:42:38 -0800 (PST) Received: by 10.227.207.205 with SMTP id fz13mr6900522wbb.0.1323286957856; Wed, 07 Dec 2011 11:42:37 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id n9sm4645470wbo.16.2011.12.07.11.42.35 (version=SSLv3 cipher=OTHER); Wed, 07 Dec 2011 11:42:36 -0800 (PST) From: Jani Nikula To: Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH v3 0/2] notmuch hooks In-Reply-To: <87hb1dru9c.fsf@servo.finestructure.net> References: <7fbe6befcf31881a9bca672f55b93501249a220c.1322859389.git.jani@nikula.org> <87hb1dru9c.fsf@servo.finestructure.net> User-Agent: Notmuch/0.10.1+81~gf7f8697 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Wed, 07 Dec 2011 21:42:33 +0200 Message-ID: <87iplsb23a.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 19:42:41 -0000 On Tue, 06 Dec 2011 18:27:27 -0800, Jameson Graef Rollins wrote: > On Tue, 6 Dec 2011 15:22:36 +0200, Jani Nikula 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.