Re: [PATCH] lib: notmuch_tags_get example was not updated to reflect api change
authorJani Nikula <jani@nikula.org>
Sun, 29 Jan 2012 06:54:35 +0000 (08:54 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:30 +0000 (09:43 -0800)
63/44b7a9d2ac8d87ccb11ba3afd31fb0bc39e9e0 [new file with mode: 0644]

diff --git a/63/44b7a9d2ac8d87ccb11ba3afd31fb0bc39e9e0 b/63/44b7a9d2ac8d87ccb11ba3afd31fb0bc39e9e0
new file mode 100644 (file)
index 0000000..342235b
--- /dev/null
@@ -0,0 +1,192 @@
+Return-Path: <jani@nikula.org>\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 F0F1A431FD2\r
+       for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:36 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[HTML_MESSAGE=0.001, 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 HLLGpG1Xsbvb for <notmuch@notmuchmail.org>;\r
+       Sat, 28 Jan 2012 22:54:36 -0800 (PST)\r
+Received: from mail-pw0-f53.google.com (mail-pw0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 1D3C2431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:36 -0800 (PST)\r
+Received: by pbbb4 with SMTP id b4so3793695pbb.26\r
+       for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:54:35 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.68.75.229 with SMTP id f5mr29493587pbw.110.1327820075234; Sat,\r
+       28 Jan 2012 22:54:35 -0800 (PST)\r
+Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST)\r
+Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST)\r
+In-Reply-To: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>\r
+References: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>\r
+Date: Sun, 29 Jan 2012 08:54:35 +0200\r
+Message-ID:\r
+ <CAB+hUn-tq7-frPcKA2Z8zW7NbAvr=4sjic9hGpe-wBw_r68NOQ@mail.gmail.com>\r
+Subject: Re: [PATCH] lib: notmuch_tags_get example was not updated to reflect\r
+       api change\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Allan Wind <allan_wind@lifeintegrity.com>\r
+Content-Type: multipart/alternative; boundary=f46d041a439ee8f3d204b7a533a6\r
+Cc: 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: Sun, 29 Jan 2012 06:54:37 -0000\r
+\r
+--f46d041a439ee8f3d204b7a533a6\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+The subject should be about what this patch does, like "lib: update\r
+notmuch_tags_get example to reflect api change"\r
+\r
+On Jan 29, 2012 12:46 AM, "Allan Wind" <allan_wind@lifeintegrity.com> wrote:\r
+>\r
+\r
+And preferably you would describe here what the api change was.\r
+\r
+> ---\r
+>  lib/notmuch.h |   21 +++++++++++----------\r
+>  1 files changed, 11 insertions(+), 10 deletions(-)\r
+>\r
+> diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+> index 7929fe7..5e6e449 100644\r
+> --- a/lib/notmuch.h\r
+> +++ b/lib/notmuch.h\r
+> @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t\r
+*message, const char *header);\r
+>  * Typical usage might be:\r
+>  *\r
+>  *     notmuch_message_t *message;\r
+> + *     notmuch_status_t status;\r
+>  *     notmuch_tags_t *tags;\r
+>  *     const char *tag;\r
+>  *\r
+> - *     message = notmuch_database_find_message (database, message_id);\r
+> - *\r
+> - *     for (tags = notmuch_message_get_tags (message);\r
+> - *          notmuch_tags_valid (tags);\r
+> - *          notmuch_result_move_to_next (tags))\r
+> - *     {\r
+> - *         tag = notmuch_tags_get (tags);\r
+> - *         ....\r
+> + *     status = notmuch_database_find_message (database, message_id,\r
+&message);\r
+> + *     if(!status && message) {\r
+> + *          for (tags = notmuch_message_get_tags (message);\r
+> + *               notmuch_tags_valid (tags);\r
+> + *               notmuch_result_move_to_next (tags))\r
+> + *          {\r
+> + *               tag = notmuch_tags_get (tags);\r
+> + *               ....\r
+> + *          }\r
+> + *          notmuch_message_destroy (message);\r
+>  *     }\r
+>  *\r
+> - *     notmuch_message_destroy (message);\r
+> - *\r
+>  * Note that there's no explicit destructor needed for the\r
+>  * notmuch_tags_t object. (For consistency, we do provide a\r
+>  * notmuch_tags_destroy function, but there's no good reason to call\r
+> --\r
+> 1.7.2.5\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+--f46d041a439ee8f3d204b7a533a6\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p><br>\r
+The subject should be about what this patch does, like &quot;lib: update no=\r
+tmuch_tags_get example to reflect api change&quot;<br>\r
+ <br>\r
+On Jan 29, 2012 12:46 AM, &quot;Allan Wind&quot; &lt;<a href=3D"mailto:alla=\r
+n_wind@lifeintegrity.com">allan_wind@lifeintegrity.com</a>&gt; wrote:<br>\r
+&gt;</p>\r
+<p>And preferably you would describe here what the api change was.<br></p>\r
+<p>&gt; ---<br>\r
+&gt; =C2=A0lib/notmuch.h | =C2=A0 21 +++++++++++----------<br>\r
+&gt; =C2=A01 files changed, 11 insertions(+), 10 deletions(-)<br>\r
+&gt;<br>\r
+&gt; diff --git a/lib/notmuch.h b/lib/notmuch.h<br>\r
+&gt; index 7929fe7..5e6e449 100644<br>\r
+&gt; --- a/lib/notmuch.h<br>\r
+&gt; +++ b/lib/notmuch.h<br>\r
+&gt; @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *m=\r
+essage, const char *header);<br>\r
+&gt; =C2=A0* Typical usage might be:<br>\r
+&gt; =C2=A0*<br>\r
+&gt; =C2=A0* =C2=A0 =C2=A0 notmuch_message_t *message;<br>\r
+&gt; + * =C2=A0 =C2=A0 notmuch_status_t status;<br>\r
+&gt; =C2=A0* =C2=A0 =C2=A0 notmuch_tags_t *tags;<br>\r
+&gt; =C2=A0* =C2=A0 =C2=A0 const char *tag;<br>\r
+&gt; =C2=A0*<br>\r
+&gt; - * =C2=A0 =C2=A0 message =3D notmuch_database_find_message (database,=\r
+ message_id);<br>\r
+&gt; - *<br>\r
+&gt; - * =C2=A0 =C2=A0 for (tags =3D notmuch_message_get_tags (message);<br=\r
+>\r
+&gt; - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_tags_valid (tags);<br>\r
+&gt; - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_result_move_to_next (tag=\r
+s))<br>\r
+&gt; - * =C2=A0 =C2=A0 {<br>\r
+&gt; - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_tags_get (tags);<br>\r
+&gt; - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....<br>\r
+&gt; + * =C2=A0 =C2=A0 status =3D notmuch_database_find_message (database, =\r
+message_id, &amp;message);<br>\r
+&gt; + * =C2=A0 =C2=A0 if(!status &amp;&amp; message) {<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for (tags =3D notmuch_message_ge=\r
+t_tags (message);<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_tags_vali=\r
+d (tags);<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_result_mo=\r
+ve_to_next (tags))<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_t=\r
+ags_get (tags);<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>\r
+&gt; + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_message_destroy (message=\r
+);<br>\r
+&gt; =C2=A0* =C2=A0 =C2=A0 }<br>\r
+&gt; =C2=A0*<br>\r
+&gt; - * =C2=A0 =C2=A0 notmuch_message_destroy (message);<br>\r
+&gt; - *<br>\r
+&gt; =C2=A0* Note that there&#39;s no explicit destructor needed for the<br=\r
+>\r
+&gt; =C2=A0* notmuch_tags_t object. (For consistency, we do provide a<br>\r
+&gt; =C2=A0* notmuch_tags_destroy function, but there&#39;s no good reason =\r
+to call<br>\r
+&gt; --<br>\r
+&gt; 1.7.2.5<br>\r
+&gt;<br>\r
+&gt; _______________________________________________<br>\r
+&gt; notmuch mailing list<br>\r
+&gt; <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=\r
+<br>\r
+&gt; <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=\r
+muchmail.org/mailman/listinfo/notmuch</a><br>\r
+</p>\r
+\r
+--f46d041a439ee8f3d204b7a533a6--\r