Re: [PATCH 6/8] cli: add support for batch tagging operations to "notmuch tag"
authorJameson Graef Rollins <jrollins@finestructure.net>
Mon, 2 Apr 2012 21:43:16 +0000 (14:43 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:01 +0000 (09:46 -0800)
91/908925fac1a1a4381af50eed8f528237a7c515 [new file with mode: 0644]

diff --git a/91/908925fac1a1a4381af50eed8f528237a7c515 b/91/908925fac1a1a4381af50eed8f528237a7c515
new file mode 100644 (file)
index 0000000..2d70df3
--- /dev/null
@@ -0,0 +1,106 @@
+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 C02B1431FB6\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 14:43:23 -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 X7UPFfRiwg-9 for <notmuch@notmuchmail.org>;\r
+       Mon,  2 Apr 2012 14:43:23 -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 5E7F0431FAE\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 14:43:23 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by earth-doxen-postvirus (Postfix) with ESMTP id E710B66E016C;\r
+       Mon,  2 Apr 2012 14:43:22 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from finestructure.net (gwave-213.ligo.caltech.edu\r
+ [131.215.114.213])    (Authenticated sender: jrollins)        by earth-doxen-submit\r
+ (Postfix) with ESMTP id 2149B66E0159; Mon,  2 Apr 2012 14:43:19 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id F2AA47F4; Mon,  2 Apr 2012 14:43:18 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH 6/8] cli: add support for batch tagging operations to\r
+       "notmuch tag"\r
+In-Reply-To:\r
+ <CAB+hUn-5yB15na2kFMZOjOEujKQTWHiefvgQYsT4Zi3UOzKwQw@mail.gmail.com>\r
+References: <cover.1333231401.git.jani@nikula.org>\r
+       <f360a40bed50208d146aee8b06946b1b8315e818.1333231401.git.jani@nikula.org>\r
+       <87ty123tpc.fsf@servo.finestructure.net>\r
+       <87aa2tc22z.fsf@zancas.localnet>\r
+       <87iphh50hz.fsf@servo.finestructure.net>\r
+       <CAB+hUn_J9oOmbWaQ+_2yGG6i6ecDXbfJWYbpaYx_kbSnAH+EcA@mail.gmail.com>\r
+       <87fwcl4yr8.fsf@servo.finestructure.net>\r
+       <CAB+hUn-5yB15na2kFMZOjOEujKQTWHiefvgQYsT4Zi3UOzKwQw@mail.gmail.com>\r
+User-Agent: Notmuch/0.12+87~g3c4c85f (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 02 Apr 2012 14:43:16 -0700\r
+Message-ID: <87d37p4xor.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: Mon, 02 Apr 2012 21:43:23 -0000\r
+\r
+--=-=-=\r
+\r
+So what if we instead modified the top level binary ("notmuch") to:\r
+\r
+* add an option to specify that commands are to be processed from stdin\r
+  (--batch)\r
+\r
+* when in batch mode the db is opened once at the beginning and locked\r
+\r
+* commands are processed from stdin in the exact same form they are\r
+  specified on the command line ("tag +foo -- from:bar", "search\r
+  tag:foo", etc.).\r
+\r
+* db is closed when EOF is reached.\r
+\r
+That seems like it would be a generally much cleaner interface, and much\r
+more flexible.\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
+iQIcBAEBCAAGBQJPeh10AAoJEO00zqvie6q8PgEP/3dfQxm6ZveppXcxcchZ+2ce\r
+IFCZAy82P5RLBSogCqXFyySZPiMibvLALh479Sh9sWnftfuV1zLrwHpboEyCflDY\r
+CpzLOXXEPKccxQwowsJ7MuBXXZd5FqJF2IrGnRcW7rbv6Qrdf2SGS7sDcZSza10s\r
+0MtbCB+WjoiRli5DKJQepWOFxR2398bdrcSDFgVVyzhWk87ODpPj4TDdrwb8HziM\r
+r6qyToI9hbwvhbOrCsoQH1U0TXhB/VQKfJkPSFAjArDVz6/A7gdKVnDHFvQvzMy9\r
+QOqCpj/O/EAF/CrEMVwKZc35pscljGxGJ+GkP9L0O4IbK8JE5GaGcCJjp9F3P99m\r
+YRuL7mKLICZRRTK1NQ7SnTBPZAOa2ZT7lQaz6Vw6Air4dc4j9ajt9R5Tg25rWUBt\r
+IvZRWgbIwlR+b8DmTqWaQfKDaTzjsZWay1BzYpKIhDZ/M90MhALmPxJ3lQUEYOIn\r
+G7WfGrzTYSpEOm/aFCBWAgO0UPNftBcZY9ezyVuEdPdIELWABOMRRPqZvZ7plKcR\r
+0HnzQlTIPuIudBMfVWNIxNJ6IsrJ4EEsTi2u2v/uPIE6TsCYjtpDqAS0j64liBZU\r
+q5IDmBdRontFpuu0wxtYXc6ykFboMu9zbMuL42JuB7lZEiJyL0s1F/pKxBg+jpZS\r
+7LHNtEtXHVAYeL1YDC0k\r
+=1AQS\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r