Re: post-new [was: Re: query on a subset of messages ?]
[notmuch-archives.git] / cb / c2ab16d1eb999ddeafd8bc7321b9681bb41795
1 Return-Path: <jrollins@finestructure.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 EA456431E82\r
6         for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.29\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 0J4aqqR89-I4 for <notmuch@notmuchmail.org>;\r
16         Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id 1D190431E64\r
20         for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 6D63C32804E;\r
23         Tue, 10 Jul 2012 09:48:30 -0700 (PDT)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (adsl-76-240-184-246.dsl.irvnca.sbcglobal.net\r
26         [76.240.184.246]) (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id 0AA892E50B51;\r
28         Tue, 10 Jul 2012 09:48:22 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 2B782868; Tue, 10 Jul 2012 09:48:21 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Sebastien Binet <binet@cern.ch>, Jani Nikula <jani@nikula.org>\r
33 Subject: Re: post-new [was: Re: query on a subset of messages ?]\r
34 In-Reply-To: <871ukk2ayc.fsf@cern.ch>\r
35 References: <871ukl5oj7.fsf@cern.ch> <87ehol2aku.fsf@servo.finestructure.net>\r
36         <87wr2c3mtj.fsf@cern.ch> <87r4sk3lxu.fsf@cern.ch>\r
37         <8739503llz.fsf@servo.finestructure.net>\r
38         <CAB+hUn-=K20mSuAkptMXZvQNv+4Mvy7sT9tVxfdYXY8yb-euJw@mail.gmail.com>\r
39         <871ukk2ayc.fsf@cern.ch>\r
40 User-Agent: Notmuch/0.13.2+54~ga0426dc (http://notmuchmail.org) Emacs/23.4.1\r
41         (x86_64-pc-linux-gnu)\r
42 Date: Tue, 10 Jul 2012 09:48:17 -0700\r
43 Message-ID: <87629vzhny.fsf@servo.finestructure.net>\r
44 MIME-Version: 1.0\r
45 Content-Type: multipart/signed; boundary="=-=-=";\r
46         micalg=pgp-sha256; protocol="application/pgp-signature"\r
47 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Tue, 10 Jul 2012 16:48:34 -0000\r
61 \r
62 --=-=-=\r
63 \r
64 On Tue, Jul 10 2012, Sebastien Binet <binet@cern.ch> wrote:\r
65 > ok. I thought using the post-new hook would have saved some i/o\r
66 > resources over my current setup:\r
67 >  offlineimap.postsynchook = ~/emacs/notmuch-lib/notmuch-tag.sh\r
68 >\r
69 > where notmuch-tag.sh is (in pseudo-code):\r
70 > ##\r
71 > /usr/bin/notmuch new\r
72 >\r
73 > for tag,query in tag-queries:\r
74 >   tag_new $tag $query\r
75 >\r
76 > ##\r
77 >\r
78 > is there any advantage of using post-new compared to this setup ?\r
79 \r
80 The hooks are just there for convenience, and as Jani says, they're\r
81 executed any time notmuch new is run, in any context.  In your setup it\r
82 looks like it would also save you having to maintain another script\r
83 (notmuch-tag.sh) since that script in it's entirety could just be the\r
84 post-new script, and the offlineimap.postsynchook could just execute\r
85 notmuch new directly.\r
86 \r
87 jamie.\r
88 \r
89 --=-=-=\r
90 Content-Type: application/pgp-signature\r
91 \r
92 -----BEGIN PGP SIGNATURE-----\r
93 Version: GnuPG v1.4.12 (GNU/Linux)\r
94 \r
95 iQIcBAEBCAAGBQJP/FzRAAoJEO00zqvie6q8HV0QALkI+b+tBC0TaE9Y8AtH/njN\r
96 GEj7zzw5bdgZIzv/hG6/sRWsnkwst9+paSqqqp72G4A4FWJfsI8VPaVVTQBCi1VB\r
97 1WBBBXewtelbP/vyquXlMyaAA+NnLJ4/SCFH0SSKpgrjy1AfRNQUrTHkZrAZGVCC\r
98 W8O3zLSKcRCCvsQm1ZTahgsnrc194ucVwHvgeKnD/Z/KmuB2mb3cVfXrssBjCnIy\r
99 kMZzQD1aYEyZVb7arFiyJWQj1BXOxSG+BT/63GIb9T7WrCQjVKi9f8QdH1vp4iiq\r
100 6SmV8vGt1FvDbczr4xkn0nChTCyOnnP2FbV08j64mNV/EFkZw8i02ccMD/91fQck\r
101 pcaI8kC1cbEAzOA+0gEsgVNl8NdT1rTKkKWByxcUZUDHi8FxwnW31p+MmcvTFoPz\r
102 qdwucFRDx4AUd4MpmwQ6wPp+NlQLlx6Je81FbfHCfCqqJmKYD3jDrjtx3DaxzfxY\r
103 pnbBN5fRBG82NmxJH0jCQQrW21Qd3RDvThV1UV2FoBJPW/eJTV1CrTwAya8/DtjX\r
104 IR0X1QSzDkg4VmsfOTqIEceLMHzq7CPShbzwiNEfPE8i+twg15H3OYmgqRMsuVBC\r
105 RbYyK52PSiNLnfNIT3AGLMaRMQ1p7u7hMlhLw7yyf51wFv06E0wsKmMBTDvxok36\r
106 1u0I7DsK4RO7QOgRWgpC\r
107 =Hpnj\r
108 -----END PGP SIGNATURE-----\r
109 --=-=-=--\r