Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / c1 / cfdbfaa3448c4a3168c315340dc361da223de1
1 Return-Path: <dkg@fifthhorseman.net>\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 arlo.cworth.org (Postfix) with ESMTP id 836216DE01F9\r
6  for <notmuch@notmuchmail.org>; Sun, 17 Jul 2016 16:44:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.000]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id xBo_lWzYjXG3 for <notmuch@notmuchmail.org>;\r
16  Sun, 17 Jul 2016 16:44:29 -0700 (PDT)\r
17 Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 706596DE01CE\r
19  for <notmuch@notmuchmail.org>; Sun, 17 Jul 2016 16:44:29 -0700 (PDT)\r
20 Received: from fifthhorseman.net (p4FCDEE1A.dip0.t-ipconnect.de\r
21  [79.205.238.26])\r
22  by che.mayfirst.org (Postfix) with ESMTPSA id C930B1037F;\r
23  Sun, 17 Jul 2016 19:44:28 -0400 (EDT)\r
24 Received: by fifthhorseman.net (Postfix, from userid 1000)\r
25  id 9C6B41FF54; Mon, 18 Jul 2016 01:44:27 +0200 (CEST)\r
26 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
27 To: David Bremner <david@tethera.net>, Notmuch Mail <notmuch@notmuchmail.org>\r
28 Subject: Re: [PATCH] add has: query prefix to search for specific properties\r
29 In-Reply-To: <87ziphxfl2.fsf@zancas.localnet>\r
30 References: <1465779955-5539-9-git-send-email-david@tethera.net>\r
31  <1467969336-7605-1-git-send-email-dkg@fifthhorseman.net>\r
32  <87ziphxfl2.fsf@zancas.localnet>\r
33 User-Agent: Notmuch/0.22+77~gaba8744 (https://notmuchmail.org) Emacs/24.5.1\r
34  (x86_64-pc-linux-gnu)\r
35 Date: Mon, 18 Jul 2016 01:44:27 +0200\r
36 Message-ID: <8760s36d9g.fsf@alice.fifthhorseman.net>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.20\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43  <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
50  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 17 Jul 2016 23:44:37 -0000\r
52 \r
53 On Sun 2016-07-17 02:39:53 +0200, David Bremner wrote:\r
54 > Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
55 >\r
56 >> We want to be able to query the properties directly, like:\r
57 >>\r
58 >>    notmuch count has:foo=bar\r
59 >>\r
60 >> which should return a count of messages where the property with key\r
61 >> "foo" has value equal to "bar".\r
62 >>\r
63 >> This patch could be improved:\r
64 >>\r
65 >> If no = sign is present (e.g. "has:foo"), it'd be nice to just match\r
66 >>  on every message that has property "foo", regardless of value.\r
67 >\r
68 > At the moment I can't think of a nice easy way to do this.  It could do\r
69 > something like that proposed for "tag:*", namely expand it internally\r
70 > into an or query, by traversing the\r
71 > db->allterms_begin("XPROPERTY"). \r
72 >\r
73 >> It would also be good to include some tests.\r
74 >\r
75 > and update notmuch-search-terms(7) ?\r
76 \r
77 yes, please -- patches welcome ;)\r
78 \r
79 an attempt to describe the distinction between "tags" and "properties":\r
80 \r
81 Tags are user-settable and user-fetchable, and automated systems are\r
82 discouraged from adding them (we have some legacy exceptions like\r
83 "inbox" and "unread" and "signed" and "encrypted").  Tags are generally\r
84 expected to be simple textual labels.\r
85 \r
86 Properties are user-fetchable, but should only be set by automated\r
87 systems.  Properties are key=value pairs (though a given message can\r
88 have any number of properties with the same key), and while the key is\r
89 expected to be a textual string (printable characters except for "=")\r
90 and the value can potentially be arbitrary binary data.\r
91 \r
92 I welcome edits on this text if it doesn't capture your current sense of\r
93 the distinction.\r
94 \r
95      --dkg\r