Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / e5 / d10ebe274b68aaae8d5bc73bdc38171edb6e03
1 Return-Path: <pieter@praet.org>\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 1BB1A431FD0\r
6         for <notmuch@notmuchmail.org>; Wed, 13 Jul 2011 07:16:45 -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 jq98OXH5aRFu for <notmuch@notmuchmail.org>;\r
16         Wed, 13 Jul 2011 07:16:43 -0700 (PDT)\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
18         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 0A80C431FB6\r
21         for <notmuch@notmuchmail.org>; Wed, 13 Jul 2011 07:16:42 -0700 (PDT)\r
22 Received: by wyh22 with SMTP id 22so159254wyh.26\r
23         for <notmuch@notmuchmail.org>; Wed, 13 Jul 2011 07:16:41 -0700 (PDT)\r
24 Received: by 10.216.136.160 with SMTP id w32mr5824122wei.30.1310566601506;\r
25         Wed, 13 Jul 2011 07:16:41 -0700 (PDT)\r
26 Received: from localhost ([109.131.104.91])\r
27         by mx.google.com with ESMTPS id fp5sm10481738wbb.15.2011.07.13.07.16.30\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Wed, 13 Jul 2011 07:16:34 -0700 (PDT)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: Austin Clements <amdragon@MIT.EDU>, David Edmondson <dme@dme.org>\r
32 Subject: Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'\r
33 In-Reply-To: <20110711210532.GC25558@mit.edu>\r
34 References: <20110705214234.GA15360@mit.edu>\r
35         <1310416993-31031-1-git-send-email-pieter@praet.org>\r
36         <20110711210532.GC25558@mit.edu>\r
37 User-Agent: Notmuch/0.6-60-ga0910f1 (http://notmuchmail.org) Emacs/23.1.50.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Wed, 13 Jul 2011 16:16:27 +0200\r
40 Message-ID: <878vs28dvo.fsf@praet.org>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Wed, 13 Jul 2011 14:16:45 -0000\r
57 \r
58 On Mon, 11 Jul 2011 17:05:32 -0400, Austin Clements <amdragon@MIT.EDU> wrote:\r
59 > Quoth Pieter Praet on Jul 11 at 10:43 pm:\r
60 > > TL;DR: I can haz regex pl0x?\r
61\r
62 > Oof, what a pain.  I'm happy to change the output format of search; I\r
63 > hadn't realized how difficult it would be to parse.  In fact, I'm not\r
64 > sure it's even parsable by regexp, because the message ID's themselves\r
65 > could contain parens.\r
66\r
67 > So what would be a good format?  One possibility would be to\r
68 > NULL-delimit the query part; as distasteful as I find that, this part\r
69 > of the search output isn't meant for user consumption.  Though I fear\r
70 > this is endemic to the dual role the search output currently plays as\r
71 > both user and computer readable.\r
72\r
73 > I've also got the code to do everything using document ID's instead of\r
74 > message ID's.  As a side-effect, it makes the search output clean and\r
75 > readily parsable since document ID's are just numbers.  Hence, there\r
76 > are no quoting or escaping issues (plus the output is much more\r
77 > compact).  I haven't sent this to the list yet because I haven't had a\r
78 > chance to benchmark it and determine if the performance benefits make\r
79 > exposing document ID's worthwhile.\r
80 \r
81 Jamie Zawinski once said/wrote [1]:\r
82   'Some people, when confronted with a problem, think "I know,\r
83   I'll use regular expressions." Now they have two problems.'\r
84 \r
85 With this in mind, I set out to get rid of this whole regex mess altogether,\r
86 by populating the search buffer using Notmuch's JSON output instead of doing\r
87 brittle text matching tricks.\r
88 \r
89 Looking for some documentation, I stumbled upon a long-forgotten gem [2].\r
90 \r
91 David's already done pretty much all of the work for us!\r
92 \r
93 Unfortunately, it doesn't apply cleanly to master anymore.\r
94 \r
95 David, would you mind rebasing it?\r
96 \r
97 \r
98 Peace\r
99 \r
100 -- \r
101 Pieter\r
102 \r
103 [1] http://www.jwz.org/hacks/\r
104 [2] id:"1290777202-14040-1-git-send-email-dme@dme.org"\r