--- /dev/null
+Return-Path: <jani@nikula.org>\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 4B845431E64\r
+ for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 06:16:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+ tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 tIh7z1tprDqN for <notmuch@notmuchmail.org>;\r
+ Tue, 10 Jul 2012 06:16:16 -0700 (PDT)\r
+Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com\r
+ [209.85.213.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 7DC0A431FBF\r
+ for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 06:16:16 -0700 (PDT)\r
+Received: by yhp26 with SMTP id 26so15098285yhp.26\r
+ for <notmuch@notmuchmail.org>; Tue, 10 Jul 2012 06:16:15 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+ :cc:content-type:x-gm-message-state;\r
+ bh=rz02vxMTQlPBeSotWL6kCTTF910156shk0nOqAYL58g=;\r
+ b=p3nLRxC0BxJNYiIDYURtziYOcBGmO+xHUUr+NRTCW7se1MoCoM6D1yLWT2ZF9BWCrN\r
+ YuWtbRjNsLVzjDVByhLX6sQO0bsRLt2rLF5Q+KfJArjXM9Y6KSFCr20et8uSMzKPpKVe\r
+ eOyVwqebMZOeWQ3771oMqqfP+4PauhvEMbkJH6nUzK/EEGi8DMd2Ch0eiwMLQd521/rr\r
+ +oQVi/S4WhYh6mWTm/xMlxpkGR/a6yd/8JHeglSLKteJjr/Iopdq5IA7oK5XpWrH4i1m\r
+ BhuXAyZaWtsKNK0Q9UppuLx8pbmyAdPgrtpZS6Nxr67QF8h2lrrCaNRVYSZRZArie/ke\r
+ bDUg==\r
+MIME-Version: 1.0\r
+Received: by 10.60.18.168 with SMTP id x8mr45588183oed.18.1341926174849; Tue,\r
+ 10 Jul 2012 06:16:14 -0700 (PDT)\r
+Received: by 10.76.10.102 with HTTP; Tue, 10 Jul 2012 06:16:14 -0700 (PDT)\r
+Received: by 10.76.10.102 with HTTP; Tue, 10 Jul 2012 06:16:14 -0700 (PDT)\r
+In-Reply-To: <87r4sk3lxu.fsf@cern.ch>\r
+References: <871ukl5oj7.fsf@cern.ch> <87ehol2aku.fsf@servo.finestructure.net>\r
+ <87wr2c3mtj.fsf@cern.ch> <87r4sk3lxu.fsf@cern.ch>\r
+Date: Tue, 10 Jul 2012 16:16:14 +0300\r
+Message-ID:\r
+ <CAB+hUn8WfhEqH4do4bPWZn+w0OxSdD+WoOKLP1zJjrwmCtEUSg@mail.gmail.com>\r
+Subject: Re: post-new [was: Re: query on a subset of messages ?]\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Sebastien Binet <binet@cern.ch>\r
+Content-Type: multipart/alternative; boundary=e89a8ff2561af77ab604c479886e\r
+X-Gm-Message-State:\r
+ ALoCoQmveIMdWNGn1cNENY0diZE17AkFiD5UL3sr95xvin/4/8ZFfGax/uFAC/toJ3ycEIGUP7Rx\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 13:16:17 -0000\r
+\r
+--e89a8ff2561af77ab604c479886e\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+On Jul 10, 2012 12:59 PM, "Sebastien Binet" <binet@cern.ch> wrote:\r
+>\r
+> Jani Nikula <jani@nikula.org> writes:\r
+>\r
+> > On Jul 9, 2012 8:12 PM, "Jameson Graef Rollins" <\r
+jrollins@finestructure.net>\r
+> > wrote:\r
+> >>\r
+> >> On Mon, Jul 09 2012, Sebastien Binet <binet@cern.ch> wrote:\r
+> >> > hum... is post-new supposed to be run even if there is no new\r
+message ?\r
+> >>\r
+> >> Hi, Sebastian. Yes, I think it runs regardless if there are any new\r
+> >> messages or not.\r
+> >\r
+> > That's correct; only errors in notmuch new cause post-new hook to be\r
+> > skipped.\r
+>\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
+There's no functional advantage. It does keep your initial tagging script\r
+connected with notmuch new rather than offlinemap, if you ever need to run\r
+notmuch new on its own.\r
+\r
+If your tagging setup is really complicated, you could have some-tag in\r
+new.tags config, and bail out early if notmuch count tag:some-tag outputs 0\r
+(and obviously notmuch tag -some-tag tag:some-tag later in the script).\r
+Just a thought.\r
+\r
+J.\r
+\r
+>\r
+> -s\r
+\r
+--e89a8ff2561af77ab604c479886e\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p><br>\r
+On Jul 10, 2012 12:59 PM, "Sebastien Binet" <<a href=3D"mailto=\r
+:binet@cern.ch">binet@cern.ch</a>> wrote:<br>\r
+><br>\r
+> Jani Nikula <<a href=3D"mailto:jani@nikula.org">jani@nikula.org</a>=\r
+> writes:<br>\r
+><br>\r
+> > On Jul 9, 2012 8:12 PM, "Jameson Graef Rollins" <<a =\r
+href=3D"mailto:jrollins@finestructure.net">jrollins@finestructure.net</a>&g=\r
+t;<br>\r
+> > wrote:<br>\r
+> >><br>\r
+> >> On Mon, Jul 09 2012, Sebastien Binet <<a href=3D"mailto:bi=\r
+net@cern.ch">binet@cern.ch</a>> wrote:<br>\r
+> >> > hum... is post-new supposed to be run even if there is n=\r
+o new message ?<br>\r
+> >><br>\r
+> >> Hi, Sebastian. =C2=A0Yes, I think it runs regardless if there=\r
+ are any new<br>\r
+> >> messages or not.<br>\r
+> ><br>\r
+> > That's correct; only errors in notmuch new cause post-new hoo=\r
+k to be<br>\r
+> > skipped.<br>\r
+><br>\r
+> ok. I thought using the post-new hook would have saved some i/o<br>\r
+> resources over my current setup:<br>\r
+> =C2=A0offlineimap.postsynchook =3D ~/emacs/notmuch-lib/notmuch-tag.sh<=\r
+br>\r
+><br>\r
+> where notmuch-tag.sh is (in pseudo-code):<br>\r
+> ##<br>\r
+> /usr/bin/notmuch new<br>\r
+><br>\r
+> for tag,query in tag-queries:<br>\r
+> =C2=A0 tag_new $tag $query<br>\r
+><br>\r
+> ##<br>\r
+><br>\r
+> is there any advantage of using post-new compared to this setup ?</p>\r
+<p>There's no functional advantage. It does keep your initial tagging s=\r
+cript connected with notmuch new rather than offlinemap, if you ever need t=\r
+o run notmuch new on its own.</p>\r
+<p>If your tagging setup is really complicated, you could have some-tag in =\r
+new.tags config, and bail out early if notmuch count tag:some-tag outputs 0=\r
+ (and obviously notmuch tag -some-tag tag:some-tag later in the script). Ju=\r
+st a thought.</p>\r
+\r
+<p>J.<br></p>\r
+<p>><br>\r
+> -s<br>\r
+</p>\r
+\r
+--e89a8ff2561af77ab604c479886e--\r