Re: Hi all
[notmuch-archives.git] / 42 / 8ff00ce2aefd947a3aefa5cf24e2352aae249e
1 Return-Path: <david@tethera.net>\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 2C4CE431FC3\r
6         for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 03:47:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 RPQzgARGDlFd for <notmuch@notmuchmail.org>;\r
16         Tue,  3 Dec 2013 03:47:17 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 095D5431FB6\r
21         for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 03:47:17 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <david@tethera.net>)\r
24         id 1VnoRd-0003P6-8j; Tue, 03 Dec 2013 07:47:13 -0400\r
25 Received: (nullmailer pid 7517 invoked by uid 1000); Tue, 03 Dec 2013\r
26         11:47:09 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
29 Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing\r
30         a database handle\r
31 In-Reply-To:\r
32  <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
33 References: <cover.1385903109.git.jani@nikula.org>\r
34         <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
35 User-Agent: Notmuch/0.17~rc2 (http://notmuchmail.org) Emacs/24.3.1\r
36         (x86_64-pc-linux-gnu)\r
37 Date: Tue, 03 Dec 2013 07:47:09 -0400\r
38 Message-ID: <87wqjm2m2q.fsf@zancas.localnet>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Tue, 03 Dec 2013 11:47:21 -0000\r
54 \r
55 \r
56 The first patch looks ok. I like the new API overall.\r
57 \r
58 As far as breaking contrib/notmuch-deliver, I'd rather fix\r
59 notmuch-insert than put effort into notmuch-deliver at this point. I\r
60 guess it could be a rough transition for people running notmuch-deliver\r
61 from git.\r
62 \r
63 Jani Nikula <jani@nikula.org> writes:\r
64 \r
65 > +/*\r
66 > + * XXX: error handling should clean up *all* state created!\r
67 > + */\r
68 is this a warning to future hackers or some current problem?\r
69 \r
70 >  notmuch_status_t\r
71 > -notmuch_database_open (const char *path,\r
72 > -                    notmuch_database_mode_t mode,\r
73 > -                    notmuch_database_t **database)\r
74 > +notmuch_database_open (notmuch_database_t *notmuch, const char *path,\r
75 > +                    notmuch_database_mode_t mode)\r
76 >  \r
77 > +/* Initialize a new, empty database handle.\r
78 > + *\r
79 \r
80 I wondered about making the new documentation adhere to doxygen?\r
81 \r
82 \r
83 > +    if (notmuch_database_open (notmuch,\r
84 > +                            notmuch_config_get_database_path (config),\r
85 > +                            NOTMUCH_DATABASE_MODE_READ_ONLY))\r
86 \r
87 Would it make any sense to migrate the mode argument to an option\r
88 setting while we're messing with the API?  \r
89 \r