Re: Hi all
[notmuch-archives.git] / 3b / c03ccd8878ce5306e1198bb649d840b1b17bac
1 Return-Path: <tomi.ollila@iki.fi>\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 6538B6DE02B0\r
6  for <notmuch@notmuchmail.org>; Tue, 31 May 2016 22:04:42 -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.579\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.579 tagged_above=-999 required=5 tests=[AWL=-0.073,\r
12   SPF_NEUTRAL=0.652] 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 kpeLF88mx5RB for <notmuch@notmuchmail.org>;\r
16  Tue, 31 May 2016 22:04:33 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 675286DE02AD\r
19  for <notmuch@notmuchmail.org>; Tue, 31 May 2016 22:04:33 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21  by guru.guru-group.fi (Postfix) with ESMTP id 9954910008E;\r
22  Wed,  1 Jun 2016 08:04:17 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
25  David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
26 Subject: Re: [RFC2 Patch 5/5] lib: iterator API for message properties\r
27 In-Reply-To: <87pos1u14p.fsf@alice.fifthhorseman.net>\r
28 References: <1463927339-5441-1-git-send-email-david@tethera.net>\r
29  <1464608999-14774-1-git-send-email-david@tethera.net>\r
30  <1464608999-14774-6-git-send-email-david@tethera.net>\r
31  <8760tthfuy.fsf@zancas.localnet> <87pos1u14p.fsf@alice.fifthhorseman.net>\r
32 User-Agent: Notmuch/0.22+32~gd4854c5 (http://notmuchmail.org) Emacs/24.5.1\r
33  (x86_64-unknown-linux-gnu)\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
35  $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
36  !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
37 Date: Wed, 01 Jun 2016 08:04:17 +0300\r
38 Message-ID: <m2oa7lcxf2.fsf@guru.guru-group.fi>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain; charset=utf-8\r
41 Content-Transfer-Encoding: quoted-printable\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.20\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46  <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
48  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
53  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Wed, 01 Jun 2016 05:04:42 -0000\r
55 \r
56 On Wed, Jun 01 2016, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
57 \r
58 > On Tue 2016-05-31 21:12:21 -0400, David Bremner <david@tethera.net> wrote:\r
59 >> I was thinking a bit about how to dump/restore these.\r
60 >>\r
61 >> The most upwardly compatible way that i thought of is something like\r
62 >>\r
63 >> #=3D msg-id key=3Dval key=3Dval\r
64 >>\r
65 >> i.e. duplicate the msg-id for messages with properties\r
66 >>\r
67 >> This would be ignored by old notmuch-restore.\r
68 >>\r
69 >> Otherwise, maybe something like\r
70 >>\r
71 >> msg-id -- +tag +tag # key=3Dval key=3Dval\r
72 >>\r
73 >> I'm not sure. this might crash old notmuch-restore.\r
74 >>\r
75 >> How important is backward compatibility, and how important is minimizing\r
76 >> dump size? It's a bit hard to predict the things people might use\r
77 >> message properties for, but for thread surgery, I would expect a small\r
78 >> number of messages with properties.\r
79 >\r
80 > The other concern is our conception of how properties are unset/removed,\r
81 > right?\r
82 >\r
83 > With tags, it's possible to include -blah to remove the tag "blah".  how\r
84 > do we remove/clear/overwrite these tags?  what about using +key=3Dval or\r
85 > -key=3Dval to set/unset certain key/value combinations, and a value-less\r
86 > key=3D to remove all values matching a given key?\r
87 >\r
88 > alternately:\r
89 >\r
90 >  key=3Dval (clears all values for "key", and sets a new value "val")\r
91 >  key+=3Dval (appends a value "val" for "key")\r
92 >  key-=3Dval (removes any "key" set to "val")\r
93 >  key=3D (clears all values for "key"\r
94 \r
95 We'd have to distinct between key being empty and unset,\r
96 comparable to how notmuch config behaves...\r
97 \r
98 \r
99 $ notmuch config get built_with.compact\r
100 true\r
101 $\r
102 $ notmuch config get search.exclude_tag\r
103 $\r
104 $ notmuch config get search.exclude_tagsz=20\r
105 Unknown configuration item: search.exclude_tagsz\r
106 zsh: exit 1     notmuch config get search.exclude_tagsz\r
107 \r
108 >\r
109 > ---------\r
110 >\r
111 > However we resolve this particular decision, it'd be nice to have a\r
112 > stable, sane story about backward compatibility going forward, so that\r
113 > we don't have to worry about it in the future.\r
114 >\r
115 > For example, each dump file could start with a line like:\r
116 >\r
117 >   #version 1\r
118 >\r
119 > and notmuch restore would assume that without "#version n" as the first\r
120 > line, it's version 0.  then notmuch restore could decline to parse dump\r
121 > files of a version that it doesn't know about.\r
122 >\r
123 > Alternately, we could have the first line be something like:\r
124 >\r
125 >    #features config properties\r
126 >\r
127 > and if the first line is not #features, then we assume that no features\r
128 > are in place -- but if restore sees features it doesn't know about, it\r
129 > can offer to proceed while warning the user that we might miss something\r
130 > (or that something might break).\r
131 \r
132 Currently dump output starts with (just run notmuch dump | less)\r
133 \r
134 #notmuch-dump batch-tag:2 config,tags\r
135 \r
136 perhaps this info could be put there -- is restore now (since a few notmuch\r
137 versions) already declining if this contains some strange data ?\r
138 \r
139 of the 2 above suggestions I'd go w/ compatibilty version; it might be\r
140 challenging to get old notmuch parse relevant data from newer format...\r
141 ... unless we also change the format to something more structured (jso^H^H^=\r
142 H^G\r
143 where only known data can be extracted (no, it is not SMOP, NO!)\r
144 \r
145 > Thanks for working on this, David!  I think this is going to be really\r
146 > useful!\r
147 \r
148 =C3=96h, what is this feature for... >;) maybe I have to look into the seri=\r
149 es\r
150 deeper...\r
151 \r
152 >\r
153 >     --dkg\r
154 \r
155 Tomi\r