[RFC2 Patch 5/5] lib: iterator API for message properties
David Bremner
david at tethera.net
Tue May 31 18:12:21 PDT 2016
David Bremner <david at tethera.net> writes:
> + notmuch_message_properties_t *list;
> + RUN(notmuch_message_add_property (message, "testkey1", "bob"));
> + RUN(notmuch_message_add_property (message, "testkey1", "testvalue2"));
> + RUN(notmuch_message_add_property (message, "testkey1", "alice"));
> +
> + for (list = notmuch_message_get_properties (message, "testkey1", TRUE);
> + notmuch_message_properties_valid (list); notmuch_message_properties_move_to_next (list)) {
> + printf("%s\n", notmuch_message_properties_value(list));
> + }
> + notmuch_message_properties_destroy (list);
I was thinking a bit about how to dump/restore these.
The most upwardly compatible way that i thought of is something like
#= msg-id key=val key=val
i.e. duplicate the msg-id for messages with properties
This would be ignored by old notmuch-restore.
Otherwise, maybe something like
msg-id -- +tag +tag # key=val key=val
I'm not sure. this might crash old notmuch-restore.
How important is backward compatibility, and how important is minimizing
dump size? It's a bit hard to predict the things people might use
message properties for, but for thread surgery, I would expect a small
number of messages with properties.
d
More information about the notmuch
mailing list