Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'
authorAustin Clements <amdragon@MIT.EDU>
Fri, 12 Aug 2011 08:28:43 +0000 (04:28 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:15 +0000 (09:39 -0800)
26/0c698fb658e85cce99c433b4ad0a85e082352d [new file with mode: 0644]

diff --git a/26/0c698fb658e85cce99c433b4ad0a85e082352d b/26/0c698fb658e85cce99c433b4ad0a85e082352d
new file mode 100644 (file)
index 0000000..720c8cb
--- /dev/null
@@ -0,0 +1,109 @@
+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 D8CEB429E25\r
+       for <notmuch@notmuchmail.org>; Fri, 12 Aug 2011 01:29:10 -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 kABOtB7MML-9 for <notmuch@notmuchmail.org>;\r
+       Fri, 12 Aug 2011 01:29:10 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
+       [18.7.68.35])\r
+       by olra.theworths.org (Postfix) with ESMTP id 62DDE431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 12 Aug 2011 01:29:10 -0700 (PDT)\r
+X-AuditID: 12074423-b7b31ae000000a3c-38-4e44e44f5e19\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id DB.E5.02620.F44E44E4; Fri, 12 Aug 2011 04:29:03 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p7C8Sx8R032087; \r
+       Fri, 12 Aug 2011 04:29:00 -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.6/8.12.4) with ESMTP id p7C8SvJj007681\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 12 Aug 2011 04:28:58 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Qrn6h-0006OH-EB; Fri, 12 Aug 2011 04:28:43 -0400\r
+Date: Fri, 12 Aug 2011 04:28:43 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Sebastian Spaeth <Sebastian@sspaeth.de>\r
+Subject: Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'\r
+Message-ID: <20110812082843.GB21339@mit.edu>\r
+References: <20110705214234.GA15360@mit.edu>\r
+       <1310416993-31031-1-git-send-email-pieter@praet.org>\r
+       <20110711210532.GC25558@mit.edu> <87zkjfnjd4.fsf@SSpaeth.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87zkjfnjd4.fsf@SSpaeth.de>\r
+User-Agent: Mutt/1.5.20 (2009-06-14)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT1/V/4uJnMP2TkMX1mzOZLX6/vsFs\r
+       MWvOPEYHZo9nq24xe3Tsu8zqsfjLUpYA5igum5TUnMyy1CJ9uwSujPM3JQuO8lTM3vGJvYGx\r
+       lauLkZNDQsBEYvKzZSwQtpjEhXvr2boYuTiEBPYxSjz/tYoJwtnAKPHk5XdGCOckk8SVLX1Q\r
+       ZUsYJY5dmscI0s8ioCpxtu0yK4jNJqAhsW3/crC4iIC2xNGWHWBxZgFviSVvvrKB2MJAdt+K\r
+       s2A1vAI6Eu9/P2KGGzr741YmiISgxMmZT1ggmrUkbvx7CRTnALKlJZb/4wAJcwLtmvAMYr6o\r
+       gIrEtf3tbBMYhWYh6Z6FpHsWQvcCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFumZ6uZkleqkp\r
+       pZsYwcHuoryD8c9BpUOMAhyMSjy8jX+c/YRYE8uKK3MPMUpyMCmJ8s556OInxJeUn1KZkVic\r
+       EV9UmpNafIhRgoNZSYR35iKgHG9KYmVValE+TEqag0VJnFdmp4OfkEB6YklqdmpqQWoRTFaG\r
+       g0NJgnf/Y6BGwaLU9NSKtMycEoQ0EwcnyHAeoOG7QGp4iwsSc4sz0yHypxgVpcR594EkBEAS\r
+       GaV5cL2wZPSKURzoFWHe1yBVPMBEBtf9CmgwE9Bg/nNgg0sSEVJSDYzrktY+WhvVFH7nXdfV\r
+       u+e9czx3rrjOv51fa0v9tB/9BVPvTJ2iZNUvZ15oel/e9kiMjeGn1TfMz3AaWh/emGTFs0Ld\r
+       /MOsN0GVrc3L7nyxyXU8wfzy7r3lhjrd7/fo+mUo3Hq4rfSEenvve9UbAQ8zlT9Xq5SqsL/6\r
+       OM1BdNst7f8Gu8rs1k9VYinOSDTUYi4qTgQA2yPgACEDAAA=\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: Fri, 12 Aug 2011 08:29:11 -0000\r
+\r
+Quoth Sebastian Spaeth on Aug 12 at 10:07 am:\r
+> On Mon, 11 Jul 2011 17:05:32 -0400, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > So what would be a good format?  One possibility would be to\r
+> > NULL-delimit the query part; as distasteful as I find that, this part\r
+> > of the search output isn't meant for user consumption.  Though I fear\r
+> > this is endemic to the dual role the search output currently plays as\r
+> > both user and computer readable.\r
+> \r
+> Perhaps we take a queue from xargs and have a command line switch for \n\r
+> vs \0 output?\r
+> \r
+> --null\r
+> -- 0\r
+>   Input items are terminated by a null character instead of by\r
+>   whitespace, and the quotes and backslash are not special (every\r
+>   character is taken lit- erally).\r
+\r
+This was one of the approaches I considered, but given that JSON\r
+parsing (with my optimized json.el) is nearly as fast as regexp-based\r
+parsing (which would also be the fastest way to parse \0-separated\r
+output) and is flexible, robust, and structured (unlike any simple\r
+delimited text format), I concluded we should just go with JSON.  If\r
+we care about speed enough to introduce another format, I'd propose\r
+S-expressions over a new text format, since they double parsing\r
+performance compared to text, have the same structural benefits as\r
+JSON, and JSON and S-expressions could even share the same formatting\r
+code (so there's no chance of representation divergence).\r
+\r
+BTW, reviving the JSON search parser is on my shortlist.  I should\r
+also bundle up my optimized json.el, since it should seriously boost\r
+the performance of notmuch-show, too.\r