--- /dev/null
+Return-Path: <teythoon@jade-hamburg.de>\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 058CF431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 17:05:02 -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 mk4UQl3g6eZV for <notmuch@notmuchmail.org>;\r
+ Thu, 23 Feb 2012 17:05:01 -0800 (PST)\r
+Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4B6A2431FBC\r
+ for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 17:05:01 -0800 (PST)\r
+Received: from mail.jade-hamburg.de (unknown [85.183.11.228])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by mail.cryptobitch.de (Postfix) with ESMTPSA id 87C00221F9E\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 02:04:59 +0100 (CET)\r
+Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
+ id E89E2DF2A9; Fri, 24 Feb 2012 02:04:58 +0100 (CET)\r
+Received: from thinkbox.jade-hamburg.de\r
+ (dslb-088-075-032-221.pools.arcor-ip.net [88.75.32.221])\r
+ (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+ (No client certificate requested) (Authenticated sender: teythoon)\r
+ by mail.jade-hamburg.de (Postfix) with ESMTPSA id 53C25DF2A5;\r
+ Fri, 24 Feb 2012 02:04:56 +0100 (CET)\r
+Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77)\r
+ (envelope-from <teythoon@thinkbox.jade-hamburg.de>)\r
+ id 1S0jae-0000g2-Fl; Fri, 24 Feb 2012 02:04:52 +0100\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+From: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+User-Agent: alot/0.21+\r
+To: David Bremner <david@tethera.net>,\r
+ notmuch mailing list <notmuch@notmuchmail.org>\r
+References: <20120221002921.8534.57091@thinkbox.jade-hamburg.de>\r
+ <20120221155312.GB30513@mit.edu>\r
+ <20120222151745.4213.93513@thinkbox.jade-hamburg.de>\r
+ <20120223222200.17796.11840@thinkbox.jade-hamburg.de>\r
+ <87hayhkr9r.fsf@zancas.localnet>\r
+In-Reply-To: <87hayhkr9r.fsf@zancas.localnet>\r
+Message-ID: <20120224010452.17796.73012@thinkbox.jade-hamburg.de>\r
+Subject: Re: notmuch as a shared object aka library knigge\r
+Date: Fri, 24 Feb 2012 02:04:52 +0100\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: Fri, 24 Feb 2012 01:05:02 -0000\r
+\r
+Quoting David Bremner (2012-02-24 01:29:36)\r
+>On Thu, 23 Feb 2012 23:22:00 +0100, Justus Winter <4winter@informatik.uni-=\r
+hamburg.de> wrote:\r
+>\r
+>> That wasn't meant to sound as harsh as it probably did. I seriously\r
+>> hope that someone is around who enjoys to hack on the c/c++ part of\r
+>> the library and is willing fix problems in it.\r
+>\r
+>Luckily I deleted my snarky reply ;).\r
+\r
+*phew* ;)\r
+\r
+>> And I worked around the two functions (that I know of) that call\r
+>> exit(3) by conditionally raising exceptions in the python bindings,\r
+>> but this is only meant as a intermediate fix, a hack that should be\r
+>> removed as soon as the library is fixed.\r
+>\r
+>Can you make test cases to document exactly when internal errors are\r
+>occuring in the library? Somehow it seems like the CLI is not triggering\r
+>them. It might help clarify the discussion and/or motivate people to fix\r
+>them.\r
+\r
+I did ;) I provided a python program in my original mail for\r
+Database.get_directory aka notmuch_database_get_directory and the one\r
+for Database.find_message_by_filename aka\r
+notmuch_database_find_message_by_filename can be trivially derived\r
+from it (though you need a path to a mail within your maildir). It\r
+should be straight forward to port those to c if you want to.\r
+\r
+Justus\r