--- /dev/null
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 2753A6DE02A6\r
+ for <notmuch@notmuchmail.org>; Tue, 31 May 2016 18:12:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.012\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5\r
+ tests=[AWL=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id FxEm43MNNb2q for <notmuch@notmuchmail.org>;\r
+ Tue, 31 May 2016 18:12:26 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id DC6056DE028C\r
+ for <notmuch@notmuchmail.org>; Tue, 31 May 2016 18:12:25 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1b7uhg-0002nI-Km; Tue, 31 May 2016 21:12:12 -0400\r
+Received: (nullmailer pid 12976 invoked by uid 1000);\r
+ Wed, 01 Jun 2016 01:12:21 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [RFC2 Patch 5/5] lib: iterator API for message properties\r
+In-Reply-To: <1464608999-14774-6-git-send-email-david@tethera.net>\r
+References: <1463927339-5441-1-git-send-email-david@tethera.net>\r
+ <1464608999-14774-1-git-send-email-david@tethera.net>\r
+ <1464608999-14774-6-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 31 May 2016 22:12:21 -0300\r
+Message-ID: <8760tthfuy.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 01 Jun 2016 01:12:34 -0000\r
+\r
+David Bremner <david@tethera.net> writes:\r
+\r
+> + notmuch_message_properties_t *list;\r
+> + RUN(notmuch_message_add_property (message, "testkey1", "bob"));\r
+> + RUN(notmuch_message_add_property (message, "testkey1", "testvalue2"));\r
+> + RUN(notmuch_message_add_property (message, "testkey1", "alice"));\r
+> +\r
+> + for (list = notmuch_message_get_properties (message, "testkey1", TRUE);\r
+> + notmuch_message_properties_valid (list); notmuch_message_properties_move_to_next (list)) {\r
+> + printf("%s\n", notmuch_message_properties_value(list));\r
+> + }\r
+> + notmuch_message_properties_destroy (list);\r
+\r
+I was thinking a bit about how to dump/restore these.\r
+\r
+The most upwardly compatible way that i thought of is something like\r
+\r
+#= msg-id key=val key=val\r
+\r
+i.e. duplicate the msg-id for messages with properties\r
+\r
+This would be ignored by old notmuch-restore.\r
+\r
+Otherwise, maybe something like\r
+\r
+msg-id -- +tag +tag # key=val key=val\r
+\r
+I'm not sure. this might crash old notmuch-restore.\r
+\r
+How important is backward compatibility, and how important is minimizing\r
+dump size? It's a bit hard to predict the things people might use\r
+message properties for, but for thread surgery, I would expect a small\r
+number of messages with properties.\r
+\r
+d\r
+\r