Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / e3 / 27ed79669471b3f570ae0d441bb55a48a58587
1 Return-Path: <jani@nikula.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 1D2B8431FBD\r
6         for <notmuch@notmuchmail.org>; Sat, 25 Jan 2014 10:22:29 -0800 (PST)\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 nWbWlWagWG32 for <notmuch@notmuchmail.org>;\r
16         Sat, 25 Jan 2014 10:22:21 -0800 (PST)\r
17 Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com\r
18  [74.125.83.51])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  04AAD431FBC    for <notmuch@notmuchmail.org>; Sat, 25 Jan 2014 10:22:20 -0800\r
21  (PST)\r
22 Received: by mail-ee0-f51.google.com with SMTP id b57so1523749eek.38\r
23         for <notmuch@notmuchmail.org>; Sat, 25 Jan 2014 10:22:19 -0800 (PST)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:subject:in-reply-to:references\r
27         :user-agent:date:message-id:mime-version:content-type;\r
28         bh=z74TPMS2B9PaAc9rC0Rwg893m0GzUdgFw8MnDBYbG6Q=;\r
29         b=YNr6kkTBuwP05QGBW0UctQWPrGxicAveOkMsSUl3xNioI2Bjpm/npF9B+vAE4IjR+1\r
30         Ko3ucf0yG47A66EXU7Zhzqlhg5dBod9CGFElgs3eZ+8v8QtTVcjkKSqq4gFBrNTGXL3j\r
31         jwjaVIAdsRCwa7jrbVfYYv8bhiVS8QllXVV1GD5/Q9qLkYacdJwnrrj/b/RvxWpcFwmZ\r
32         S3rzs9yvwghyPUtubd4BEKAMSS14eNCXcnW7e9miqfeaJ+dgPPQZMxECQP9ysFmCVIj/\r
33         OcaGpKkwRnKw35WSdZ+/nomFp2lYQBebZ7usHK/HHH4iBGlW43aepGT23wohG8lOSdJ2\r
34         lQnQ==\r
35 X-Gm-Message-State:\r
36  ALoCoQlcZfp+A4ydKuqp5xWlMhw6hkwe4BNGDjq7/ZFtlDUk4RlcvPq2WPXojHAPErwHi9SqtgUQ\r
37 X-Received: by 10.14.126.1 with SMTP id a1mr14117550eei.81.1390674139556;\r
38         Sat, 25 Jan 2014 10:22:19 -0800 (PST)\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
40         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
41         b41sm18760342eef.16.2014.01.25.10.22.17 for <multiple recipients>\r
42         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
43         Sat, 25 Jan 2014 10:22:18 -0800 (PST)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: David Bremner <david@tethera.net>,\r
46         Austin Clements <aclements@csail.mit.edu>, notmuch@notmuchmail.org\r
47 Subject: Re: [PATCH 0/5] lib: make folder: prefix literal\r
48 In-Reply-To: <87lhy4nglq.fsf@zancas.localnet>\r
49 References: <cover.1389304779.git.jani@nikula.org>\r
50         <87y525m649.fsf@awakening.csail.mit.edu>\r
51         <87r47wfltb.fsf@nikula.org> <87iot8f4vg.fsf@nikula.org>\r
52         <87lhy4nglq.fsf@zancas.localnet>\r
53 User-Agent: Notmuch/0.17+44~ge3b4cd9 (http://notmuchmail.org) Emacs/24.3.1\r
54         (x86_64-pc-linux-gnu)\r
55 Date: Sat, 25 Jan 2014 20:22:16 +0200\r
56 Message-ID: <87fvobgbvr.fsf@nikula.org>\r
57 MIME-Version: 1.0\r
58 Content-Type: text/plain\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Sat, 25 Jan 2014 18:22:29 -0000\r
72 \r
73 On Sat, 25 Jan 2014, David Bremner <david@tethera.net> wrote:\r
74 > Jani Nikula <jani@nikula.org> writes:\r
75 >\r
76 >> On Sat, 25 Jan 2014, Jani Nikula <jani@nikula.org> wrote:\r
77 >>> Perhaps we need to have two prefixes, one of which is the literal\r
78 >>> filesystem folder and another which hides the implementation details,\r
79 >>> like I mentioned in my mail to Peter [1]. But consider this: my proposed\r
80 >>> implementation does cover *all* use cases.\r
81 >>\r
82 >> Here's a thought. With boolean prefix folder:, we can devise a scheme\r
83 >> where the folder: query defines what is to be matched.\r
84 >>\r
85 >> For example:\r
86 >>\r
87 >> folder:foo   match files in foo, foo/new, and foo/cur.\r
88 >> folder:foo/  match all files in all subdirectories under foo (this\r
89 >>              would handle Tomi's use case), including foo/new and\r
90 >>               foo/cur.\r
91 >\r
92 > handling hierarchies sounds useful and natural\r
93 >\r
94 >> folder:foo/. match in foo only, and specifically not in foo/cur or foo/new.\r
95 >> folder:foo/new  match in foo/new, and specifically not in foo/cur (this\r
96 >>              allows distinguishing between messages in cur and new).\r
97 >\r
98 > is "new" special cased here? or do you rely on it being a leaf\r
99 > directory?\r
100 \r
101 A little bit of both I guess; not too bad.\r
102 \r
103 An alternative might be to make the variant without the trailing /\r
104 recursive, so folder:foo would match all files in all subdirectories\r
105 under foo, including foo/new and foo/cur. This would be more compatible\r
106 with the current folder: prefix too.\r
107 \r
108 Then, if you wanted to match without recursion, you'd have to have\r
109 "folder:foo/. OR folder:foo/new OR folder:foo/cur" assuming new and cur\r
110 are leaf nodes, and if not, with "/." at the end.\r
111 \r
112 But you'd have to decide what to do with "folder:foo/" which would then\r
113 match nothing.\r
114 \r
115 There's definitely room for thoughts and discussion.\r
116 \r
117 >> folder:/     match everything.\r
118 >> folder:/.    match in top level maildir only.\r
119 >> folder:""    match in top level maildir, including cur/new.\r
120 >\r
121 > I could certainly support this UI, assuming the database bloat is not\r
122 > too bad.\r
123 >\r
124 > I started to wonder about using 3 prefixes instead, but then I read your\r
125 > message again and a light went on. ;).\r
126 \r
127 \o/\r
128 \r
129 \r
130 BR,\r
131 Jani.\r