--- /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 3616F6DE0243\r
+ for <notmuch@notmuchmail.org>; Fri, 3 Jun 2016 16:13:03 -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 hL5v-2qL8c7f for <notmuch@notmuchmail.org>;\r
+ Fri, 3 Jun 2016 16:12:55 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 593BB6DE0159\r
+ for <notmuch@notmuchmail.org>; Fri, 3 Jun 2016 16:12:55 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1b8yGg-00041A-JZ; Fri, 03 Jun 2016 19:12:42 -0400\r
+Received: (nullmailer pid 32126 invoked by uid 1000);\r
+ Fri, 03 Jun 2016 23:12:52 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, notmuch@notmuchmail.org\r
+Subject: Re: [RFC2 Patch 5/5] lib: iterator API for message properties\r
+In-Reply-To: <87y46mpcbf.fsf@alice.fifthhorseman.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
+ <8760tthfuy.fsf@zancas.localnet> <87pos1u14p.fsf@alice.fifthhorseman.net>\r
+ <87eg8ht2sb.fsf@alice.fifthhorseman.net> <87lh2ofpxk.fsf@zancas.localnet>\r
+ <87inxrqyv1.fsf@alice.fifthhorseman.net> <8737oufn6f.fsf@zancas.localnet>\r
+ <87y46mpcbf.fsf@alice.fifthhorseman.net>\r
+User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 03 Jun 2016 20:12:52 -0300\r
+Message-ID: <87mvn1euiz.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: Fri, 03 Jun 2016 23:13:03 -0000\r
+\r
+Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
+\r
+> [ Unknown signature status ]\r
+> On Fri 2016-06-03 08:54:00 -0400, David Bremner wrote:\r
+>> Sure, where do you think that kind of documentation is appropriate?\r
+>> There is the giant comment about the database schema in\r
+>> lib/database.cc. Actually I just noticed I already failed to update that\r
+>> for libconfig stuff.\r
+>\r
+> That comment seems OK, but it won't be exposed to the people who are in\r
+> that middle range (python or ruby programmers but not C programmers).\r
+> Do we have a place for this kind of mid-level documenation?\r
+\r
+The simplest solution is probably API documentation itself\r
+(lib/notmuch.h), which should propagage to the bindings documentation.\r
+Maybe I'll start with that, and we can go from there.\r
+\r
+>\r
+>> [ dkg wrote: ]\r
+>>> * for messages which have multiple files, which file is actually indexed\r
+>>\r
+>> yes. Although rather than storing that, I think the right answer is more\r
+>> like "all of them".\r
+>\r
+> I don't think we do this, do we? Is this a bug? is it tracked somewhere?\r
+\r
+IMHO it is a bug. It's implicit in\r
+\r
+ id:87k42vrqve.fsf@pip.fifthhorseman.net\r
+\r
+and the various requests for List-Id indexing, but it's probably worth\r
+starting a seperate thread to track it. Especially since there are some\r
+unresolved design issues. Like what to return for searches.\r
+\r
+> This is exactly my point -- i don't care about reproducibility of the\r
+> exact numbering, but , the thread-id is *not* reproducible from the\r
+> message sets. This is not only because of the ghost message leakage bug\r
+> documented in T590-thread-breakage.sh, but also because threads can be\r
+> joined by a message that is later removed (e.g., the "notmuch-join"\r
+> script in id:87egabu5ta.fsf@alice.fifthhorseman.net ).\r
+\r
+I see, I guess that's the intended behaviour given 604d1e0977c.\r
+\r
+I haven't thought about the pros and cons of dumping/restoring\r
+thread-ids. At least my database has about half as many threads as\r
+messages, so it's a bit of data, but perhaps that's not a bit problem.\r
+It's somewhat orthogonal to this series since those terms are already\r
+attached to messages.\r
+\r
+>> I'm not sure what you have in mind, something more ambitious than the\r
+>> header added post 0.22?\r
+>\r
+> Can you point me to the definition for that header? i still don't\r
+> understand what the batch-tag:2 part means. (sorry i haven't been\r
+> keeping up with the master branch lately!)\r
+>\r
+\r
+Currently there's just the source: it says which format, and with that\r
+format, which subset of output.\r
+\r
+static void\r
+print_dump_header (gzFile output, int output_format, int include)\r
+{\r
+ gzprintf (output, "#notmuch-dump %s:%d %s%s%s\n",\r
+ (output_format == DUMP_FORMAT_SUP) ? "sup" : "batch-tag",\r
+ NOTMUCH_DUMP_VERSION,\r
+ (include & DUMP_INCLUDE_CONFIG) ? "config" : "",\r
+ (include & DUMP_INCLUDE_TAGS) && (include & DUMP_INCLUDE_CONFIG) ? "," : "",\r
+ (include & DUMP_INCLUDE_TAGS) ? "tags" : "");\r
+}\r
+\r