Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle
authorDavid Bremner <david@tethera.net>
Wed, 15 Jan 2014 14:19:32 +0000 (10:19 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:03 +0000 (09:59 -0800)
e1/9dc3fe60aab87eeff3f60789cbec74b0441c23 [new file with mode: 0644]

diff --git a/e1/9dc3fe60aab87eeff3f60789cbec74b0441c23 b/e1/9dc3fe60aab87eeff3f60789cbec74b0441c23
new file mode 100644 (file)
index 0000000..7eaf6da
--- /dev/null
@@ -0,0 +1,76 @@
+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