Re: notmuch.el: controlling what does and doesn't get expanded in searches
[notmuch-archives.git] / 76 / 8deeb2bc273466dd15fd89d18f6fd91e8b43dd
1 Return-Path: <dme@dme.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 4F02D4196F4\r
6         for <notmuch@notmuchmail.org>; Tue, 15 Jun 2010 09:35:05 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.89\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.89 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id R4MOUIDCaIbJ for <notmuch@notmuchmail.org>;\r
16         Tue, 15 Jun 2010 09:34:54 -0700 (PDT)\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
18         [74.125.82.181])\r
19         by olra.theworths.org (Postfix) with ESMTP id B0F85431FC1\r
20         for <notmuch@notmuchmail.org>; Tue, 15 Jun 2010 09:34:54 -0700 (PDT)\r
21 Received: by wyb35 with SMTP id 35so5406490wyb.26\r
22         for <notmuch@notmuchmail.org>; Tue, 15 Jun 2010 09:34:53 -0700 (PDT)\r
23 Received: by 10.227.145.77 with SMTP id c13mr7436029wbv.140.1276619692731;\r
24         Tue, 15 Jun 2010 09:34:52 -0700 (PDT)\r
25 Received: from ut.hh.sledj.net ([83.217.165.81])\r
26         by mx.google.com with ESMTPS id u36sm47097477wbv.18.2010.06.15.09.34.50\r
27         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
28         Tue, 15 Jun 2010 09:34:51 -0700 (PDT)\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)\r
30         id 04EF1594018; Tue, 15 Jun 2010 10:17:28 +0100 (BST)\r
31 To: Sebastian Spaeth <Sebastian@SSpaeth.de>, notmuch <notmuch@notmuchmail.org>\r
32 Subject: Re: Python bindings and Xapian exceptions\r
33 In-Reply-To: <878w6gis5g.fsf@SSpaeth.de>\r
34 References: <87k4q7s43v.fsf@ut.hh.sledj.net> <878w6gis5g.fsf@SSpaeth.de>\r
35 User-Agent: Notmuch/0.3.1-53-gb7aeaa1 (http://notmuchmail.org) Emacs/23.1.1\r
36         (x86_64-pc-linux-gnu)\r
37 From: David Edmondson <dme@dme.org>\r
38 Date: Tue, 15 Jun 2010 10:17:25 +0100\r
39 Message-ID: <874oh4ejtm.fsf@ut.hh.sledj.net>\r
40 MIME-Version: 1.0\r
41 Content-Type: multipart/signed; boundary="=-=-=";\r
42         micalg=pgp-sha1; protocol="application/pgp-signature"\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Tue, 15 Jun 2010 16:35:05 -0000\r
56 \r
57 --=-=-=\r
58 Content-Transfer-Encoding: quoted-printable\r
59 \r
60 On Tue, 15 Jun 2010 11:03:55 +0200, "Sebastian Spaeth" <Sebastian@SSpaeth.d=\r
61 e> wrote:\r
62 > >   A Xapian exception occurred finding message: The revision being read\r
63 > >   has been discarded - you should call Xapian::Database::reopen() and\r
64 > >   retry the operation.\r
65 > > It makes the Python bindings almost useless to me.\r
66 >=20\r
67 > Not sure, if the python bindings should simply drop and reopen a\r
68 > database connection in that case? But I am not sure if libnotmuch.so\r
69 > still simply exits on such an error case.\r
70 >=20\r
71 > The proper fix, and a reason why I am not immediately hacking around in\r
72 > the python bindings is that notmuch the library would actually return a\r
73 > proper error value rather than print to stderr and quit.\r
74 >=20\r
75 > Happy to receive suggestions on how to handle this best from the python\r
76 > side of things.\r
77 \r
78 Unfortunately I'm an ignorant about the best solution.\r
79 \r
80 Having the Python layer hide the fact that the database was re-opened\r
81 seems as though it might be dangerous (in case I mix state from before\r
82 and after the re-opening), but I can't give a concrete example of\r
83 something that would fail.\r
84 \r
85 Given that exception based programming is common in Python, simple\r
86 raising the exception and allowing the application to handle it appears\r
87 to make sense.\r
88 \r
89 dme.\r
90 =2D-=20\r
91 David Edmondson, http://dme.org\r
92 \r
93 --=-=-=\r
94 Content-Type: application/pgp-signature\r
95 \r
96 -----BEGIN PGP SIGNATURE-----\r
97 Version: GnuPG v1.4.10 (GNU/Linux)\r
98 \r
99 iEUEARECAAYFAkwXRSUACgkQaezQq/BJZRZQXQCfbFwSpimczLRvdFSgKT74cDKC\r
100 DbAAmJ+ju+lNNTaWQvUULNymGKGgjMA=\r
101 =vKYv\r
102 -----END PGP SIGNATURE-----\r
103 --=-=-=--\r