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
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
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
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
56 On Wed, Jun 01 2016, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
\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
61 >> The most upwardly compatible way that i thought of is something like
\r
63 >> #=3D msg-id key=3Dval key=3Dval
\r
65 >> i.e. duplicate the msg-id for messages with properties
\r
67 >> This would be ignored by old notmuch-restore.
\r
69 >> Otherwise, maybe something like
\r
71 >> msg-id -- +tag +tag # key=3Dval key=3Dval
\r
73 >> I'm not sure. this might crash old notmuch-restore.
\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
80 > The other concern is our conception of how properties are unset/removed,
\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
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
95 We'd have to distinct between key being empty and unset,
\r
96 comparable to how notmuch config behaves...
\r
99 $ notmuch config get built_with.compact
\r
102 $ notmuch config get search.exclude_tag
\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
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
115 > For example, each dump file could start with a line like:
\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
123 > Alternately, we could have the first line be something like:
\r
125 > #features config properties
\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
132 Currently dump output starts with (just run notmuch dump | less)
\r
134 #notmuch-dump batch-tag:2 config,tags
\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
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
143 where only known data can be extracted (no, it is not SMOP, NO!)
\r
145 > Thanks for working on this, David! I think this is going to be really
\r
148 =C3=96h, what is this feature for... >;) maybe I have to look into the seri=
\r