[PATCH 0/5] nmbug-status fixups from notmuch-to-html
[notmuch-archives.git] / 94 / 6587b171412683436c5a9e9b41c92927494669
1 Return-Path: <tomi.ollila@iki.fi>\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 63CDE431FCB\r
6         for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 11:35:37 -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 ZJG1SpBoTh2M for <notmuch@notmuchmail.org>;\r
16         Tue,  3 Dec 2013 11:35:26 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id B3E29431FB6\r
19         for <notmuch@notmuchmail.org>; Tue,  3 Dec 2013 11:35:26 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id EBE3C100086;\r
22         Tue,  3 Dec 2013 21:35:18 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Jani Nikula <jani@nikula.org>, David Bremner <david@tethera.net>,\r
25         notmuch@notmuchmail.org\r
26 Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing\r
27         a database handle\r
28 In-Reply-To: <871u1tyhai.fsf@nikula.org>\r
29 References: <cover.1385903109.git.jani@nikula.org>\r
30         <fc7ecd990e55fcfba17de4d71e8823c98760f9ce.1385903109.git.jani@nikula.org>\r
31         <87wqjm2m2q.fsf@zancas.localnet>\r
32         <m2iov6m3c7.fsf@guru.guru-group.fi> <871u1tyhai.fsf@nikula.org>\r
33 User-Agent: Notmuch/0.17~rc1+17~ga2e1a2f (http://notmuchmail.org) Emacs/24.3.1\r
34         (x86_64-unknown-linux-gnu)\r
35 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
36         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
37         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
38 Date: Tue, 03 Dec 2013 21:35:18 +0200\r
39 Message-ID: <m2y541pw21.fsf@guru.guru-group.fi>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Tue, 03 Dec 2013 19:35:37 -0000\r
55 \r
56 On Tue, Dec 03 2013, Jani Nikula <jani@nikula.org> wrote:\r
57 \r
58 > On Tue, 03 Dec 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
59 >> On Tue, Dec 03 2013, David Bremner <david@tethera.net> wrote:\r
60 >>\r
61 >>> The first patch looks ok. I like the new API overall.\r
62 >>>\r
63 >>> As far as breaking contrib/notmuch-deliver, I'd rather fix\r
64 >>> notmuch-insert than put effort into notmuch-deliver at this point. I\r
65 >>> guess it could be a rough transition for people running notmuch-deliver\r
66 >>> from git.\r
67 >>>\r
68 >>> Jani Nikula <jani@nikula.org> writes:\r
69 >>>\r
70 >>>> +/*\r
71 >>>> + * XXX: error handling should clean up *all* state created!\r
72 >>>> + */\r
73 >>> is this a warning to future hackers or some current problem?\r
74 >>>\r
75 >>>>  notmuch_status_t\r
76 >>>> -notmuch_database_open (const char *path,\r
77 >>>> -                 notmuch_database_mode_t mode,\r
78 >>>> -                 notmuch_database_t **database)\r
79 >>>> +notmuch_database_open (notmuch_database_t *notmuch, const char *path,\r
80 >>>> +                 notmuch_database_mode_t mode)\r
81 >>>>  \r
82 >>>> +/* Initialize a new, empty database handle.\r
83 >>>> + *\r
84 >>>\r
85 >>> I wondered about making the new documentation adhere to doxygen?\r
86 >>>\r
87 >>>\r
88 >>>> +    if (notmuch_database_open (notmuch,\r
89 >>>> +                         notmuch_config_get_database_path (config),\r
90 >>>> +                         NOTMUCH_DATABASE_MODE_READ_ONLY))\r
91 >>>\r
92 >>> Would it make any sense to migrate the mode argument to an option\r
93 >>> setting while we're messing with the API?  \r
94 >>\r
95 >> if that, then also database_path to options ?\r
96 >\r
97 > See my reply to David.\r
98 \r
99 I agree with your explanation there. \r
100 \r
101 >\r
102 >> I also like this suggestion best of all seen so far, but what if:\r
103 >>\r
104 >>   #define NOTMUCH_MAJOR_VERSION      0\r
105 >>   #define NOTMUCH_MINOR_VERSION      17\r
106 >>  -#define NOTMUCH_MICRO_VERSION      0\r
107 >>  +#define NOTMUCH_MICRO_VERSION      90\r
108 >>\r
109 >> until changed API/ABI is set into stone (i.e. 0.18.0 at freeze time).\r
110 >\r
111 > That would require the user to conditional build with:\r
112 >\r
113 > #if NOTMUCH_CHECK_VERSION(0, 17, 90)\r
114 >       /* building against post-0.17 git master or released 0.18 */\r
115 > #else\r
116 >       /* building against 0.17 */\r
117 > #endif\r
118 >\r
119 > instead of the IMHO more natural and accurate:\r
120 >\r
121 > #if NOTMUCH_CHECK_VERSION(0, 18, 0)\r
122 >       /* building against post-0.17 git master or released 0.18 */\r
123 > #else\r
124 >       /* building against 0.17 */\r
125 > #endif\r
126 \r
127 True -- I always forget that NOTMUCH_CHECK_VERSION() checks for the\r
128 value and *newer*. Although there is slight difference I don't think\r
129 it warrants the use of intermediate values -- the changing API is\r
130 much bigger issue than this and that is what we have to concentrate on.\r
131 >\r
132 >\r
133 > BR,\r
134 > Jani.\r
135 \r
136 Tomi\r
137 \r