Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 26 / 0c698fb658e85cce99c433b4ad0a85e082352d
1 Return-Path: <amdragon@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D8CEB429E25\r
6         for <notmuch@notmuchmail.org>; Fri, 12 Aug 2011 01:29:10 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id kABOtB7MML-9 for <notmuch@notmuchmail.org>;\r
16         Fri, 12 Aug 2011 01:29:10 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 62DDE431FB6\r
20         for <notmuch@notmuchmail.org>; Fri, 12 Aug 2011 01:29:10 -0700 (PDT)\r
21 X-AuditID: 12074423-b7b31ae000000a3c-38-4e44e44f5e19\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id DB.E5.02620.F44E44E4; Fri, 12 Aug 2011 04:29:03 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p7C8Sx8R032087; \r
27         Fri, 12 Aug 2011 04:29:00 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p7C8SvJj007681\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Fri, 12 Aug 2011 04:28:58 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Qrn6h-0006OH-EB; Fri, 12 Aug 2011 04:28:43 -0400\r
37 Date: Fri, 12 Aug 2011 04:28:43 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Sebastian Spaeth <Sebastian@sspaeth.de>\r
40 Subject: Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'\r
41 Message-ID: <20110812082843.GB21339@mit.edu>\r
42 References: <20110705214234.GA15360@mit.edu>\r
43         <1310416993-31031-1-git-send-email-pieter@praet.org>\r
44         <20110711210532.GC25558@mit.edu> <87zkjfnjd4.fsf@SSpaeth.de>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 Content-Disposition: inline\r
48 In-Reply-To: <87zkjfnjd4.fsf@SSpaeth.de>\r
49 User-Agent: Mutt/1.5.20 (2009-06-14)\r
50 X-Brightmail-Tracker:\r
51  H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT1/V/4uJnMP2TkMX1mzOZLX6/vsFs\r
52         MWvOPEYHZo9nq24xe3Tsu8zqsfjLUpYA5igum5TUnMyy1CJ9uwSujPM3JQuO8lTM3vGJvYGx\r
53         lauLkZNDQsBEYvKzZSwQtpjEhXvr2boYuTiEBPYxSjz/tYoJwtnAKPHk5XdGCOckk8SVLX1Q\r
54         ZUsYJY5dmscI0s8ioCpxtu0yK4jNJqAhsW3/crC4iIC2xNGWHWBxZgFviSVvvrKB2MJAdt+K\r
55         s2A1vAI6Eu9/P2KGGzr741YmiISgxMmZT1ggmrUkbvx7CRTnALKlJZb/4wAJcwLtmvAMYr6o\r
56         gIrEtf3tbBMYhWYh6Z6FpHsWQvcCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFumZ6uZkleqkp\r
57         pZsYwcHuoryD8c9BpUOMAhyMSjy8jX+c/YRYE8uKK3MPMUpyMCmJ8s556OInxJeUn1KZkVic\r
58         EV9UmpNafIhRgoNZSYR35iKgHG9KYmVValE+TEqag0VJnFdmp4OfkEB6YklqdmpqQWoRTFaG\r
59         g0NJgnf/Y6BGwaLU9NSKtMycEoQ0EwcnyHAeoOG7QGp4iwsSc4sz0yHypxgVpcR594EkBEAS\r
60         GaV5cL2wZPSKURzoFWHe1yBVPMBEBtf9CmgwE9Bg/nNgg0sSEVJSDYzrktY+WhvVFH7nXdfV\r
61         u+e9czx3rrjOv51fa0v9tB/9BVPvTJ2iZNUvZ15oel/e9kiMjeGn1TfMz3AaWh/emGTFs0Ld\r
62         /MOsN0GVrc3L7nyxyXU8wfzy7r3lhjrd7/fo+mUo3Hq4rfSEenvve9UbAQ8zlT9Xq5SqsL/6\r
63         OM1BdNst7f8Gu8rs1k9VYinOSDTUYi4qTgQA2yPgACEDAAA=\r
64 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Fri, 12 Aug 2011 08:29:11 -0000\r
78 \r
79 Quoth Sebastian Spaeth on Aug 12 at 10:07 am:\r
80 > On Mon, 11 Jul 2011 17:05:32 -0400, Austin Clements <amdragon@MIT.EDU> wrote:\r
81 > > So what would be a good format?  One possibility would be to\r
82 > > NULL-delimit the query part; as distasteful as I find that, this part\r
83 > > of the search output isn't meant for user consumption.  Though I fear\r
84 > > this is endemic to the dual role the search output currently plays as\r
85 > > both user and computer readable.\r
86\r
87 > Perhaps we take a queue from xargs and have a command line switch for \n\r
88 > vs \0 output?\r
89\r
90 > --null\r
91 > -- 0\r
92 >   Input items are terminated by a null character instead of by\r
93 >   whitespace, and the quotes and backslash are not special (every\r
94 >   character is taken lit- erally).\r
95 \r
96 This was one of the approaches I considered, but given that JSON\r
97 parsing (with my optimized json.el) is nearly as fast as regexp-based\r
98 parsing (which would also be the fastest way to parse \0-separated\r
99 output) and is flexible, robust, and structured (unlike any simple\r
100 delimited text format), I concluded we should just go with JSON.  If\r
101 we care about speed enough to introduce another format, I'd propose\r
102 S-expressions over a new text format, since they double parsing\r
103 performance compared to text, have the same structural benefits as\r
104 JSON, and JSON and S-expressions could even share the same formatting\r
105 code (so there's no chance of representation divergence).\r
106 \r
107 BTW, reviving the JSON search parser is on my shortlist.  I should\r
108 also bundle up my optimized json.el, since it should seriously boost\r
109 the performance of notmuch-show, too.\r