--- /dev/null
+Return-Path: <amdragon@mit.edu>\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 CB148431FAE\r
+ for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 07:53:15 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 EM3OegRgB4ff for <notmuch@notmuchmail.org>;\r
+ Tue, 21 Feb 2012 07:53:15 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+ [18.7.68.36])\r
+ by olra.theworths.org (Postfix) with ESMTP id 33E47431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 07:53:15 -0800 (PST)\r
+X-AuditID: 12074424-b7fae6d000000906-65-4f43bdea0c4b\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 35.F8.02310.AEDB34F4; Tue, 21 Feb 2012 10:53:14 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1LFrELr017419; \r
+ Tue, 21 Feb 2012 10:53:14 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1LFrCPg028324\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Tue, 21 Feb 2012 10:53:13 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1Rzs1g-0002on-Fb; Tue, 21 Feb 2012 10:53:12 -0500\r
+Date: Tue, 21 Feb 2012 10:53:12 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+Subject: Re: notmuch as a shared object aka library knigge\r
+Message-ID: <20120221155312.GB30513@mit.edu>\r
+References: <20120221002921.8534.57091@thinkbox.jade-hamburg.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <20120221002921.8534.57091@thinkbox.jade-hamburg.de>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT132119nf4PpvI4vZrT+YLK7fnMns\r
+ wOQx8fxpNo9nq24xBzBFcdmkpOZklqUW6dslcGXsOqddcJarYs6lHSwNjIc5uhg5OSQETCTe\r
+ rbnMBmGLSVy4tx7I5uIQEtjHKHFm4S5WCGcDo8T0x3OYIZyTTBLf5iyGcpYwShxqPsPSxcjB\r
+ wSKgKnFhhRzIKDYBDYlt+5czgtgiAqYSGx48YAexmQWMJO7vmM4MYgsLWEnc3TEZbDWvgI7E\r
+ l9c/mUBsIQEHiVcvFzJDxAUlTs58wgLRqyVx499LJpBVzALSEsv/gX3AKeAoMfnMYbBWUQEV\r
+ iSknt7FNYBSahaR7FpLuWQjdCxiZVzHKpuRW6eYmZuYUpybrFicn5uWlFuma6+VmluilppRu\r
+ YgQHtYvKDsbmQ0qHGAU4GJV4eIs3OvsLsSaWFVfmHmKU5GBSEuWduQcoxJeUn1KZkVicEV9U\r
+ mpNafIhRgoNZSYR38QKgHG9KYmVValE+TEqag0VJnFdD652fkEB6YklqdmpqQWoRTFaGg0NJ\r
+ glcWGL1CgkWp6akVaZk5JQhpJg5OkOE8QMN/gyzmLS5IzC3OTIfIn2JUlBLn/QSSEABJZJTm\r
+ wfXCks4rRnGgV4R5eUBW8AATFlz3K6DBTECDW/47ggwuSURISTUwljzl3L3rskDiM4l3z828\r
+ jipJlR203XLJa4bDl62pDbtDH0+5ef1juxmHQK/UqjmuzOdnJrm4rDi/zFiv12txqwXr290V\r
+ FZdcO05vePbgdpePobrg3biouI0bGLib6/JPXZou1Lbs/97d5ZvEC851W+eXB3dUOm1/bVV2\r
+ PF2rf+t5sa4lrUV8SizFGYmGWsxFxYkA17/r6RUDAAA=\r
+Cc: notmuch mailing list <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: Tue, 21 Feb 2012 15:53:15 -0000\r
+\r
+Quoth Justus Winter on Feb 21 at 1:29 am:\r
+> Hi fellow notmuchrs,\r
+> \r
+> while going through the python bindings I recently came across the\r
+> following note in the documentation for the Database.get_directory\r
+> function [0]:\r
+> \r
+> ~~~ snip ~~~\r
+> Warning\r
+> \r
+> This call needs a writable database in Database.MODE.READ_WRITE\r
+> mode. The underlying library will exit the program if this method is\r
+> used on a read-only database!\r
+> ~~~ snap ~~~\r
+\r
+This is a bug and should be thought of as such. INTERNAL_ERROR should\r
+only be used for internal library inconsistencies (e.g., things that\r
+should never ever happen) and the fact that it's leaking out here (and\r
+easy to trigger) is simply a mistake.\r
+\r
+This hasn't been fixed because it derives from an interface flaw.\r
+What should notmuch_database_get_directory do on a read-only database?\r
+It's specified to *create* the directory document if it doesn't exist,\r
+which is the problem. We could of course bandage this up and make it\r
+return an error if you request a non-existent directory on a read-only\r
+database, but that's an inconsistent interface. I think we were\r
+hoping to tweak the interface so you can tell it whether or not you\r
+want to create the directory, independent of the database being\r
+read/write or read-only, but no one has gotten around to that. As\r
+always, patches welcome!\r