Re: notmuch-search-toggle-order and notmuch-tree
[notmuch-archives.git] / 1f / bf9db192a8ed0d49106cfb94a55e5e32d820d3
1 Return-Path: <tom.prince@ualberta.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 1575D429E25\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Dec 2011 11:55:03 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 2q2bnuYvZafc for <notmuch@notmuchmail.org>;\r
16         Sun,  4 Dec 2011 11:55:02 -0800 (PST)\r
17 Received: from socrates.hocat.ca (socrates.hocat.ca [76.10.188.53])\r
18         by olra.theworths.org (Postfix) with ESMTP id 71F7A429E21\r
19         for <notmuch@notmuchmail.org>; Sun,  4 Dec 2011 11:55:02 -0800 (PST)\r
20 Received: from hermes.hocat.ca (hermes.hocat.ca [69.165.170.253])\r
21         by socrates.hocat.ca (Postfix) with SMTP id 454AB14E6;\r
22         Sun,  4 Dec 2011 12:55:00 -0700 (MST)\r
23 Received: (nullmailer pid 20598 invoked by uid 1000);\r
24         Sun, 04 Dec 2011 19:54:58 -0000\r
25 From: Tom Prince <tom.prince@ualberta.net>\r
26 To: Jani Nikula <jani@nikula.org>, Austin Clements <amdragon@MIT.EDU>\r
27 Subject: Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new\r
28  hooks\r
29 In-Reply-To: <87pqg4ku2y.fsf@nikula.org>\r
30 References:\r
31  <6688b09fffa2a66b496af78008102f88ab4e9450.1322953841.git.jani@nikula.org>\r
32         <6ccaa31da55b0dfc9e339780e43e24e1489235e8.1322953841.git.jani@nikula.org>\r
33         <20111204040047.GB16405@mit.edu> <87pqg4ku2y.fsf@nikula.org>\r
34 User-Agent: Notmuch/0.10.1 (http://notmuchmail.org) Emacs/23.3.3\r
35         (x86_64-pc-linux-gnu)\r
36 Date: Sun, 04 Dec 2011 14:54:58 -0500\r
37 Message-ID: <871uskglil.fsf@hermes.hocat.ca>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=us-ascii\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Sun, 04 Dec 2011 19:55:03 -0000\r
54 \r
55 On Sun, 04 Dec 2011 21:36:21 +0200, Jani Nikula <jani@nikula.org> wrote:\r
56 > > > +    if (run_hooks && !ret && !interrupted)\r
57 > > > + ret = notmuch_run_hook (db_path, "post-new");\r
58 > > \r
59 > > Does it matter at this point if the hook fails?  I'm not sure.\r
60\r
61 > I wasn't sure either, but I ended up thinking that the hooks become part\r
62 > of 'notmuch new' and claiming success when a hook fails is not quite\r
63 > right. This might have importance if scripting 'notmuch new'.\r
64 \r
65 One can always add 'exit 0' (perhaps with appropriate traps) to the hook\r
66 script, if you don't want failure to propagate to 'notmuch new', but not\r
67 the reverse.\r
68 \r
69   Tom\r