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