--- /dev/null
+Return-Path: <bremner@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 7824E6DE09ED\r
+ for <notmuch@notmuchmail.org>; Sat, 23 Jan 2016 07:00:11 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.309\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.309 tagged_above=-999 required=5 tests=[AWL=0.242,\r
+ RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] 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 gfkqn2UwiJyU for <notmuch@notmuchmail.org>;\r
+ Sat, 23 Jan 2016 07:00:09 -0800 (PST)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 785C96DE091B\r
+ for <notmuch@notmuchmail.org>; Sat, 23 Jan 2016 07:00:09 -0800 (PST)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>) id 1aMzf0-00015j-44\r
+ for notmuch@notmuchmail.org; Sat, 23 Jan 2016 09:59:30 -0500\r
+Received: (nullmailer pid 4038 invoked by uid 1000);\r
+ Sat, 23 Jan 2016 15:00:06 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: library config API\r
+Date: Sat, 23 Jan 2016 10:59:53 -0400\r
+Message-Id: <1453561198-2893-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.6.4\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: Sat, 23 Jan 2016 15:00:11 -0000\r
+\r
+This is the third revision of this series, and I think the first two\r
+patches are ready for serious review.\r
+\r
+Some things to think about with respect to the CLI patches\r
+\r
+- Should we include a "version" line at the top of the dump? Currently this is unused, but that\r
+ depends on the format being auto detectable?\r
+\r
+- Should config info be included by default in the dump output?\r
+\r
+- Should we restore config info by default?\r
+\r
+- How about the usual bikeshedding about argument names? I'm loath to\r
+ spend time on docs until after this.\r
+\r
+I guess a global question is what do we need this API / feature for. I\r
+can think of three things so far\r
+\r
+- tag aliases [1]\r
+\r
+- making the location of the mail tree configurable (i.e. allowing\r
+ mailtree and database to live in different places).\r
+\r
+- Some things like excludes and maildir synchonization are natural to\r
+ have in common between all clients.\r
+\r
+A natural question is why not provide a library API to access\r
+.notmuch-config? Having a plain text representation of the\r
+configuration (without the extra step of dumping it) is obviously\r
+attractive, but\r
+\r
+- We would need to build some locking / synchronization to prevent\r
+ various clients and interactive text editors from stomping on each\r
+ other. This we have for free by using xapian metadata.\r
+\r
+- We'd also have to provide our own key/value datastructure.\r
+\r
+- At least for tag aliases, I think there is a second argument that\r
+ this information part of the users tagging state, and should be\r
+ backed up as part of the normal dump / restore process.\r
+\r
+[1]: id:87mvsd7cxr.fsf@zancas.localnet\r
+\r