Re: post-new [was: Re: query on a subset of messages ?]
authorJameson Graef Rollins <jrollins@finestructure.net>
Tue, 10 Jul 2012 16:48:17 +0000 (09:48 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:08 +0000 (09:48 -0800)
cb/c2ab16d1eb999ddeafd8bc7321b9681bb41795 [new file with mode: 0644]

diff --git a/cb/c2ab16d1eb999ddeafd8bc7321b9681bb41795 b/cb/c2ab16d1eb999ddeafd8bc7321b9681bb41795
new file mode 100644 (file)
index 0000000..814dfe0
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id EA456431E82\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 0J4aqqR89-I4 for <notmuch@notmuchmail.org>;\r
+       Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1D190431E64\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 09:48:33 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id 6D63C32804E;\r
+       Tue, 10 Jul 2012 09:48:30 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (adsl-76-240-184-246.dsl.irvnca.sbcglobal.net\r
+       [76.240.184.246]) (Authenticated sender: jrollins)\r
+       by fire-doxen-submit (Postfix) with ESMTP id 0AA892E50B51;\r
+       Tue, 10 Jul 2012 09:48:22 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id 2B782868; Tue, 10 Jul 2012 09:48:21 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Sebastien Binet <binet@cern.ch>, Jani Nikula <jani@nikula.org>\r
+Subject: Re: post-new [was: Re: query on a subset of messages ?]\r
+In-Reply-To: <871ukk2ayc.fsf@cern.ch>\r
+References: <871ukl5oj7.fsf@cern.ch> <87ehol2aku.fsf@servo.finestructure.net>\r
+       <87wr2c3mtj.fsf@cern.ch> <87r4sk3lxu.fsf@cern.ch>\r
+       <8739503llz.fsf@servo.finestructure.net>\r
+       <CAB+hUn-=K20mSuAkptMXZvQNv+4Mvy7sT9tVxfdYXY8yb-euJw@mail.gmail.com>\r
+       <871ukk2ayc.fsf@cern.ch>\r
+User-Agent: Notmuch/0.13.2+54~ga0426dc (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 10 Jul 2012 09:48:17 -0700\r
+Message-ID: <87629vzhny.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 10 Jul 2012 16:48:34 -0000\r
+\r
+--=-=-=\r
+\r
+On Tue, Jul 10 2012, Sebastien Binet <binet@cern.ch> wrote:\r
+> ok. I thought using the post-new hook would have saved some i/o\r
+> resources over my current setup:\r
+>  offlineimap.postsynchook = ~/emacs/notmuch-lib/notmuch-tag.sh\r
+>\r
+> where notmuch-tag.sh is (in pseudo-code):\r
+> ##\r
+> /usr/bin/notmuch new\r
+>\r
+> for tag,query in tag-queries:\r
+>   tag_new $tag $query\r
+>\r
+> ##\r
+>\r
+> is there any advantage of using post-new compared to this setup ?\r
+\r
+The hooks are just there for convenience, and as Jani says, they're\r
+executed any time notmuch new is run, in any context.  In your setup it\r
+looks like it would also save you having to maintain another script\r
+(notmuch-tag.sh) since that script in it's entirety could just be the\r
+post-new script, and the offlineimap.postsynchook could just execute\r
+notmuch new directly.\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJP/FzRAAoJEO00zqvie6q8HV0QALkI+b+tBC0TaE9Y8AtH/njN\r
+GEj7zzw5bdgZIzv/hG6/sRWsnkwst9+paSqqqp72G4A4FWJfsI8VPaVVTQBCi1VB\r
+1WBBBXewtelbP/vyquXlMyaAA+NnLJ4/SCFH0SSKpgrjy1AfRNQUrTHkZrAZGVCC\r
+W8O3zLSKcRCCvsQm1ZTahgsnrc194ucVwHvgeKnD/Z/KmuB2mb3cVfXrssBjCnIy\r
+kMZzQD1aYEyZVb7arFiyJWQj1BXOxSG+BT/63GIb9T7WrCQjVKi9f8QdH1vp4iiq\r
+6SmV8vGt1FvDbczr4xkn0nChTCyOnnP2FbV08j64mNV/EFkZw8i02ccMD/91fQck\r
+pcaI8kC1cbEAzOA+0gEsgVNl8NdT1rTKkKWByxcUZUDHi8FxwnW31p+MmcvTFoPz\r
+qdwucFRDx4AUd4MpmwQ6wPp+NlQLlx6Je81FbfHCfCqqJmKYD3jDrjtx3DaxzfxY\r
+pnbBN5fRBG82NmxJH0jCQQrW21Qd3RDvThV1UV2FoBJPW/eJTV1CrTwAya8/DtjX\r
+IR0X1QSzDkg4VmsfOTqIEceLMHzq7CPShbzwiNEfPE8i+twg15H3OYmgqRMsuVBC\r
+RbYyK52PSiNLnfNIT3AGLMaRMQ1p7u7hMlhLw7yyf51wFv06E0wsKmMBTDvxok36\r
+1u0I7DsK4RO7QOgRWgpC\r
+=Hpnj\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r