--- /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 olra.theworths.org (Postfix) with ESMTP id 2C4CE431FC3\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Dec 2013 03:47:21 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id RPQzgARGDlFd for <notmuch@notmuchmail.org>;\r
+ Tue, 3 Dec 2013 03:47:17 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 095D5431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Dec 2013 03:47:17 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1VnoRd-0003P6-8j; Tue, 03 Dec 2013 07:47:13 -0400\r
+Received: (nullmailer pid 7517 invoked by uid 1000); Tue, 03 Dec 2013\r
+ 11:47:09 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing\r
+ a database handle\r
+In-Reply-To:\r
+ <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
+References: <cover.1385903109.git.jani@nikula.org>\r
+ <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
+User-Agent: Notmuch/0.17~rc2 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 03 Dec 2013 07:47:09 -0400\r
+Message-ID: <87wqjm2m2q.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.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 03 Dec 2013 11:47:21 -0000\r
+\r
+\r
+The first patch looks ok. I like the new API overall.\r
+\r
+As far as breaking contrib/notmuch-deliver, I'd rather fix\r
+notmuch-insert than put effort into notmuch-deliver at this point. I\r
+guess it could be a rough transition for people running notmuch-deliver\r
+from git.\r
+\r
+Jani Nikula <jani@nikula.org> writes:\r
+\r
+> +/*\r
+> + * XXX: error handling should clean up *all* state created!\r
+> + */\r
+is this a warning to future hackers or some current problem?\r
+\r
+> notmuch_status_t\r
+> -notmuch_database_open (const char *path,\r
+> - notmuch_database_mode_t mode,\r
+> - notmuch_database_t **database)\r
+> +notmuch_database_open (notmuch_database_t *notmuch, const char *path,\r
+> + notmuch_database_mode_t mode)\r
+> \r
+> +/* Initialize a new, empty database handle.\r
+> + *\r
+\r
+I wondered about making the new documentation adhere to doxygen?\r
+\r
+\r
+> + if (notmuch_database_open (notmuch,\r
+> + notmuch_config_get_database_path (config),\r
+> + NOTMUCH_DATABASE_MODE_READ_ONLY))\r
+\r
+Would it make any sense to migrate the mode argument to an option\r
+setting while we're messing with the API? \r
+\r