--- /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 214CF431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 15 Jan 2014 06:19:49 -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 gagBYfgwraLh for <notmuch@notmuchmail.org>;\r
+ Wed, 15 Jan 2014 06:19:41 -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 9ACD3431FBD\r
+ for <notmuch@notmuchmail.org>; Wed, 15 Jan 2014 06:19:41 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1W3RJg-00069k-KK; Wed, 15 Jan 2014 10:19:36 -0400\r
+Received: (nullmailer pid 24799 invoked by uid 1000); Wed, 15 Jan 2014\r
+ 14:19:32 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Jani Nikula <jani@nikula.org>, Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing\r
+ a database handle\r
+In-Reply-To: <87a9eyk8ap.fsf@zancas.localnet>\r
+References: <cover.1385903109.git.jani@nikula.org>\r
+ <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
+ <20131204231113.GD8854@mit.edu> <87mwkf40x5.fsf@nikula.org>\r
+ <87a9eyk8ap.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.17+30~g50677dd (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Wed, 15 Jan 2014 10:19:32 -0400\r
+Message-ID: <87r489iayz.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: notmuch@notmuchmail.org\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: Wed, 15 Jan 2014 14:19:49 -0000\r
+\r
+David Bremner <david@tethera.net> writes:\r
+\r
+> I'm not sure if this is also a dead end, but I was trying to sketch out\r
+> an api that returned something more detailed as status and came up with\r
+> the following. The general idea is to replace notmuch_status_t with a\r
+> pointer to struct. This will require pretty noisy source changes,\r
+> unless we're comfortable with using NULL pointer to indicate success.\r
+> In either case we'd rename the existing enum to something like\r
+> notmuch_status_code_t.\r
+>\r
+> /* pseudo-C follows */\r
+>\r
+> typedef struct notmuch_status_struct * notmuch_status_t;\r
+>\r
+\r
+A less API disruptive change would be to continue returning codes, but\r
+provide functions to interrogate the main types (database, message, etc)\r
+for "last-error". We'd still need to special case database_(open|create)\r
+\r
+d\r