--- /dev/null
+Return-Path: <amdragon@mit.edu>\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 A4132431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 9 Oct 2013 07:11:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[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 EtfEEY9Jcn2d for <notmuch@notmuchmail.org>;\r
+ Wed, 9 Oct 2013 07:11:50 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+ [18.7.68.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 51196431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 9 Oct 2013 07:11:50 -0700 (PDT)\r
+X-AuditID: 12074422-b7f5a8e000000a34-fc-525564238d71\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id DF.FD.02612.32465525; Wed, 9 Oct 2013 10:11:47 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r99EBkDt005590; \r
+ Wed, 9 Oct 2013 10:11:47 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r99EBj4o020422\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+ Wed, 9 Oct 2013 10:11:46 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1VTuUK-00050C-Rj; Wed, 09 Oct 2013 10:11:44 -0400\r
+Date: Wed, 9 Oct 2013 10:11:44 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH 07/11] emacs: Use notmuch tag --batch for large tag\r
+ queries\r
+Message-ID: <20131009141144.GO21611@mit.edu>\r
+References: <1381185201-25197-1-git-send-email-amdragon@mit.edu>\r
+ <1381185201-25197-8-git-send-email-amdragon@mit.edu>\r
+ <87vc18rzn3.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87vc18rzn3.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IR4hTV1lVOCQ0y2L9dxmL1XB6L6zdnMjsw\r
+ eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGU8PzWUtOM5XMfPyZOYGxu3cXYycHBICJhJT\r
+ V25ggbDFJC7cW8/WxcjFISSwj1Gi6ekDZghnA6PE2zdfmSCcU0wSvR0ToMqWMEq8eLiGGaSf\r
+ RUBFYv2Xj6wgNpuAhsS2/csZQWwRAR2J24cWsIPYzALSEt9+NzOB2MICgRJXN7eD1fMC1Zy6\r
+ 8JgRYuhURonvT96zQCQEJU7OfMIC0awlcePfS6BmDrBBy/9xgIQ5gXatW3YfbKYo0A1TTm5j\r
+ m8AoNAtJ9ywk3bMQuhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3SNdXLzSzRS00p3cQICmx2\r
+ F6UdjD8PKh1iFOBgVOLhfcAfEiTEmlhWXJl7iFGSg0lJlHd7TGiQEF9SfkplRmJxRnxRaU5q\r
+ 8SFGCQ5mJRFe42igHG9KYmVValE+TEqag0VJnPcWh32QkEB6YklqdmpqQWoRTFaGg0NJgvdD\r
+ ElCjYFFqempFWmZOCUKaiYMTZDgP0PBTIDW8xQWJucWZ6RD5U4yKUuK8DIlACQGQREZpHlwv\r
+ LPG8YhQHekWYtxeknQeYtOC6XwENZgIavP17CMjgkkSElFQDo5yCmKhKSdhJr3+P6nfqf0+9\r
+ 8OjWXiWBsOaiG+bM//z2zghW6HnuZG+88vzJ7qMdW3sTF6zd3VOYuKUnsHTppeSrnzoOsofk\r
+ T5iWpB95OH7b6vrOVbdk3jUf3767mi9N+OvLOVlCHPUKLxhXT5jpq/9+0tfjMWsiHfqv3LJx\r
+ l7q4Z1t3QaBplBJLcUaioRZzUXEiAFXg7agXAwAA\r
+Cc: 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: Wed, 09 Oct 2013 14:11:56 -0000\r
+\r
+Quoth Mark Walters on Oct 08 at 8:27 am:\r
+> On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > (Unfortunately, it's difficult to first demonstrate this problem with\r
+> > a known-broken test because modern Linux kernels have argument length\r
+> > limits in the megabytes, which makes Emacs really slow!)\r
+> > ---\r
+> > emacs/notmuch-lib.el | 8 ++++++++\r
+> > emacs/notmuch-tag.el | 12 ++++++++++--\r
+> > test/emacs | 8 ++++++++\r
+> > 3 files changed, 26 insertions(+), 2 deletions(-)\r
+> >\r
+> > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> > index 22156f1..348112b 100644\r
+> > --- a/emacs/notmuch-lib.el\r
+> > +++ b/emacs/notmuch-lib.el\r
+> > @@ -261,6 +261,14 @@ user-friendly queries."\r
+> > "Return a query that matches the message with id ID."\r
+> > (concat "id:" (notmuch-escape-boolean-term id)))\r
+> > \r
+> > +(defun notmuch-hex-encode (str)\r
+> > + "Hex-encode STR (e.g., as used by batch tagging).\r
+> > +\r
+> > +This replaces spaces, percents, and double quotes in STR with\r
+> > +%NN where NN is the hexadecimal value of the character."\r
+> > + (replace-regexp-in-string\r
+> > + "[ %\"]" (lambda (match) (format "%%%02x" (aref match 0))) str))\r
+> > +\r
+> > ;;\r
+> > \r
+> > (defun notmuch-common-do-stash (text)\r
+> > diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
+> > index 064cfa8..a4eec14 100644\r
+> > --- a/emacs/notmuch-tag.el\r
+> > +++ b/emacs/notmuch-tag.el\r
+> > @@ -242,6 +242,8 @@ from TAGS if present."\r
+> > (error "Changed tag must be of the form `+this_tag' or `-that_tag'")))))\r
+> > (sort result-tags 'string<)))\r
+> > \r
+> > +(defconst notmuch-tag-argument-limit 1000)\r
+> > +\r
+> \r
+> Another triviality: I think this should have a doc string saying use\r
+> batch tag if the query is longer than this.\r
+\r
+Done.\r
+\r
+> The other patches in the series up to this point LGTM.\r
+> \r
+> Mark\r