1 Return-Path: <jani@nikula.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 F0F1A431FD2
\r
6 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:36 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5
\r
12 tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 HLLGpG1Xsbvb for <notmuch@notmuchmail.org>;
\r
16 Sat, 28 Jan 2012 22:54:36 -0800 (PST)
\r
17 Received: from mail-pw0-f53.google.com (mail-pw0-f53.google.com
\r
18 [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 1D3C2431FB6
\r
21 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:36 -0800 (PST)
\r
22 Received: by pbbb4 with SMTP id b4so3793695pbb.26
\r
23 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:35 -0800 (PST)
\r
25 Received: by 10.68.75.229 with SMTP id f5mr29493587pbw.110.1327820075234; Sat,
\r
26 28 Jan 2012 22:54:35 -0800 (PST)
\r
27 Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST)
\r
28 Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST)
\r
29 In-Reply-To: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>
\r
30 References: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>
\r
31 Date: Sun, 29 Jan 2012 08:54:35 +0200
\r
33 <CAB+hUn-tq7-frPcKA2Z8zW7NbAvr=4sjic9hGpe-wBw_r68NOQ@mail.gmail.com>
\r
34 Subject: Re: [PATCH] lib: notmuch_tags_get example was not updated to reflect
\r
36 From: Jani Nikula <jani@nikula.org>
\r
37 To: Allan Wind <allan_wind@lifeintegrity.com>
\r
38 Content-Type: multipart/alternative; boundary=f46d041a439ee8f3d204b7a533a6
\r
39 Cc: notmuch@notmuchmail.org
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Sun, 29 Jan 2012 06:54:37 -0000
\r
54 --f46d041a439ee8f3d204b7a533a6
\r
55 Content-Type: text/plain; charset=UTF-8
\r
57 The subject should be about what this patch does, like "lib: update
\r
58 notmuch_tags_get example to reflect api change"
\r
60 On Jan 29, 2012 12:46 AM, "Allan Wind" <allan_wind@lifeintegrity.com> wrote:
\r
63 And preferably you would describe here what the api change was.
\r
66 > lib/notmuch.h | 21 +++++++++++----------
\r
67 > 1 files changed, 11 insertions(+), 10 deletions(-)
\r
69 > diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
70 > index 7929fe7..5e6e449 100644
\r
71 > --- a/lib/notmuch.h
\r
72 > +++ b/lib/notmuch.h
\r
73 > @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t
\r
74 *message, const char *header);
\r
75 > * Typical usage might be:
\r
77 > * notmuch_message_t *message;
\r
78 > + * notmuch_status_t status;
\r
79 > * notmuch_tags_t *tags;
\r
80 > * const char *tag;
\r
82 > - * message = notmuch_database_find_message (database, message_id);
\r
84 > - * for (tags = notmuch_message_get_tags (message);
\r
85 > - * notmuch_tags_valid (tags);
\r
86 > - * notmuch_result_move_to_next (tags))
\r
88 > - * tag = notmuch_tags_get (tags);
\r
90 > + * status = notmuch_database_find_message (database, message_id,
\r
92 > + * if(!status && message) {
\r
93 > + * for (tags = notmuch_message_get_tags (message);
\r
94 > + * notmuch_tags_valid (tags);
\r
95 > + * notmuch_result_move_to_next (tags))
\r
97 > + * tag = notmuch_tags_get (tags);
\r
100 > + * notmuch_message_destroy (message);
\r
103 > - * notmuch_message_destroy (message);
\r
105 > * Note that there's no explicit destructor needed for the
\r
106 > * notmuch_tags_t object. (For consistency, we do provide a
\r
107 > * notmuch_tags_destroy function, but there's no good reason to call
\r
111 > _______________________________________________
\r
112 > notmuch mailing list
\r
113 > notmuch@notmuchmail.org
\r
114 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
116 --f46d041a439ee8f3d204b7a533a6
\r
117 Content-Type: text/html; charset=UTF-8
\r
118 Content-Transfer-Encoding: quoted-printable
\r
121 The subject should be about what this patch does, like "lib: update no=
\r
122 tmuch_tags_get example to reflect api change"<br>
\r
124 On Jan 29, 2012 12:46 AM, "Allan Wind" <<a href=3D"mailto:alla=
\r
125 n_wind@lifeintegrity.com">allan_wind@lifeintegrity.com</a>> wrote:<br>
\r
127 <p>And preferably you would describe here what the api change was.<br></p>
\r
129 > =C2=A0lib/notmuch.h | =C2=A0 21 +++++++++++----------<br>
\r
130 > =C2=A01 files changed, 11 insertions(+), 10 deletions(-)<br>
\r
132 > diff --git a/lib/notmuch.h b/lib/notmuch.h<br>
\r
133 > index 7929fe7..5e6e449 100644<br>
\r
134 > --- a/lib/notmuch.h<br>
\r
135 > +++ b/lib/notmuch.h<br>
\r
136 > @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *m=
\r
137 essage, const char *header);<br>
\r
138 > =C2=A0* Typical usage might be:<br>
\r
140 > =C2=A0* =C2=A0 =C2=A0 notmuch_message_t *message;<br>
\r
141 > + * =C2=A0 =C2=A0 notmuch_status_t status;<br>
\r
142 > =C2=A0* =C2=A0 =C2=A0 notmuch_tags_t *tags;<br>
\r
143 > =C2=A0* =C2=A0 =C2=A0 const char *tag;<br>
\r
145 > - * =C2=A0 =C2=A0 message =3D notmuch_database_find_message (database,=
\r
148 > - * =C2=A0 =C2=A0 for (tags =3D notmuch_message_get_tags (message);<br=
\r
150 > - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_tags_valid (tags);<br>
\r
151 > - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_result_move_to_next (tag=
\r
153 > - * =C2=A0 =C2=A0 {<br>
\r
154 > - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_tags_get (tags);<br>
\r
155 > - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....<br>
\r
156 > + * =C2=A0 =C2=A0 status =3D notmuch_database_find_message (database, =
\r
157 message_id, &message);<br>
\r
158 > + * =C2=A0 =C2=A0 if(!status && message) {<br>
\r
159 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for (tags =3D notmuch_message_ge=
\r
160 t_tags (message);<br>
\r
161 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_tags_vali=
\r
163 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_result_mo=
\r
164 ve_to_next (tags))<br>
\r
165 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>
\r
166 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_t=
\r
167 ags_get (tags);<br>
\r
168 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....<br>
\r
169 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
\r
170 > + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_message_destroy (message=
\r
172 > =C2=A0* =C2=A0 =C2=A0 }<br>
\r
174 > - * =C2=A0 =C2=A0 notmuch_message_destroy (message);<br>
\r
176 > =C2=A0* Note that there's no explicit destructor needed for the<br=
\r
178 > =C2=A0* notmuch_tags_t object. (For consistency, we do provide a<br>
\r
179 > =C2=A0* notmuch_tags_destroy function, but there's no good reason =
\r
184 > _______________________________________________<br>
\r
185 > notmuch mailing list<br>
\r
186 > <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=
\r
188 > <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=
\r
189 muchmail.org/mailman/listinfo/notmuch</a><br>
\r
192 --f46d041a439ee8f3d204b7a533a6--
\r