From 550db58429d60828e59cc324ddf4180407e6f9ed Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 24 Feb 2012 02:04:52 +0100 Subject: [PATCH] Re: notmuch as a shared object aka library knigge --- 62/b1380cb7e44508ecbe6c798c448a0d1ae60805 | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 62/b1380cb7e44508ecbe6c798c448a0d1ae60805 diff --git a/62/b1380cb7e44508ecbe6c798c448a0d1ae60805 b/62/b1380cb7e44508ecbe6c798c448a0d1ae60805 new file mode 100644 index 000000000..58ca9a533 --- /dev/null +++ b/62/b1380cb7e44508ecbe6c798c448a0d1ae60805 @@ -0,0 +1,97 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 058CF431FAE + for ; Thu, 23 Feb 2012 17:05:02 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id mk4UQl3g6eZV for ; + Thu, 23 Feb 2012 17:05:01 -0800 (PST) +Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4B6A2431FBC + for ; Thu, 23 Feb 2012 17:05:01 -0800 (PST) +Received: from mail.jade-hamburg.de (unknown [85.183.11.228]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by mail.cryptobitch.de (Postfix) with ESMTPSA id 87C00221F9E + for ; Fri, 24 Feb 2012 02:04:59 +0100 (CET) +Received: by mail.jade-hamburg.de (Postfix, from userid 401) + id E89E2DF2A9; Fri, 24 Feb 2012 02:04:58 +0100 (CET) +Received: from thinkbox.jade-hamburg.de + (dslb-088-075-032-221.pools.arcor-ip.net [88.75.32.221]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) (Authenticated sender: teythoon) + by mail.jade-hamburg.de (Postfix) with ESMTPSA id 53C25DF2A5; + Fri, 24 Feb 2012 02:04:56 +0100 (CET) +Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77) + (envelope-from ) + id 1S0jae-0000g2-Fl; Fri, 24 Feb 2012 02:04:52 +0100 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: Justus Winter <4winter@informatik.uni-hamburg.de> +User-Agent: alot/0.21+ +To: David Bremner , + notmuch mailing list +References: <20120221002921.8534.57091@thinkbox.jade-hamburg.de> + <20120221155312.GB30513@mit.edu> + <20120222151745.4213.93513@thinkbox.jade-hamburg.de> + <20120223222200.17796.11840@thinkbox.jade-hamburg.de> + <87hayhkr9r.fsf@zancas.localnet> +In-Reply-To: <87hayhkr9r.fsf@zancas.localnet> +Message-ID: <20120224010452.17796.73012@thinkbox.jade-hamburg.de> +Subject: Re: notmuch as a shared object aka library knigge +Date: Fri, 24 Feb 2012 02:04:52 +0100 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 24 Feb 2012 01:05:02 -0000 + +Quoting David Bremner (2012-02-24 01:29:36) +>On Thu, 23 Feb 2012 23:22:00 +0100, Justus Winter <4winter@informatik.uni-= +hamburg.de> wrote: +> +>> That wasn't meant to sound as harsh as it probably did. I seriously +>> hope that someone is around who enjoys to hack on the c/c++ part of +>> the library and is willing fix problems in it. +> +>Luckily I deleted my snarky reply ;). + +*phew* ;) + +>> And I worked around the two functions (that I know of) that call +>> exit(3) by conditionally raising exceptions in the python bindings, +>> but this is only meant as a intermediate fix, a hack that should be +>> removed as soon as the library is fixed. +> +>Can you make test cases to document exactly when internal errors are +>occuring in the library? Somehow it seems like the CLI is not triggering +>them. It might help clarify the discussion and/or motivate people to fix +>them. + +I did ;) I provided a python program in my original mail for +Database.get_directory aka notmuch_database_get_directory and the one +for Database.find_message_by_filename aka +notmuch_database_find_message_by_filename can be trivially derived +from it (though you need a path to a mail within your maildir). It +should be straight forward to port those to c if you want to. + +Justus -- 2.26.2