[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / dc / 7be9363900b01f565bda5cd7242f81ec660e44
1 Return-Path: <allan@lifeintegrity.com>\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 807FC431E64\r
6         for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 06:02:34 -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 yWfSK7CTR2b4 for <notmuch@notmuchmail.org>;\r
16         Mon, 30 Jan 2012 06:02:34 -0800 (PST)\r
17 Received: from pawan.lifeintegrity.com (lifeintegrity.com [173.48.39.13])\r
18         by olra.theworths.org (Postfix) with ESMTP id 12A52431FBC\r
19         for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 06:02:34 -0800 (PST)\r
20 Received: from vent.lifeintegrity.com (lifeintegrity.com [173.48.39.13])\r
21         by submission.lifeintegrity.com (Postfix) with ESMTPS id 6CCDF124\r
22         for <notmuch@notmuchmail.org>; Mon, 30 Jan 2012 14:02:33 +0000 (UTC)\r
23 Received: by vent.lifeintegrity.com (Postfix, from userid 1000)\r
24         id 64D20182116; Mon, 30 Jan 2012 14:02:33 +0000 (UTC)\r
25 From: Allan Wind <allan_wind@lifeintegrity.com>\r
26 To: notmuch@notmuchmail.org\r
27 Subject: [PATCH] lib: update notmuch_tags_get examle to reflect api change\r
28 Date: Mon, 30 Jan 2012 09:02:33 -0500\r
29 Message-Id: <1327932153-22088-1-git-send-email-allan_wind@lifeintegrity.com>\r
30 X-Mailer: git-send-email 1.7.2.5\r
31 X-BeenThere: notmuch@notmuchmail.org\r
32 X-Mailman-Version: 2.1.13\r
33 Precedence: list\r
34 List-Id: "Use and development of the notmuch mail system."\r
35         <notmuch.notmuchmail.org>\r
36 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
37         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
38 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
39 List-Post: <mailto:notmuch@notmuchmail.org>\r
40 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
41 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
43 X-List-Received-Date: Mon, 30 Jan 2012 14:02:34 -0000\r
44 \r
45 The function notmuch_database_find_message_by_filename now requires a\r
46 notmuch_message_t and returns a notmuch_status_t.  This\r
47 change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,\r
48 version 0.9.\r
49 ---\r
50  lib/notmuch.h |   21 +++++++++++----------\r
51  1 files changed, 11 insertions(+), 10 deletions(-)\r
52 \r
53 diff --git a/lib/notmuch.h b/lib/notmuch.h\r
54 index 7929fe7..5e6e449 100644\r
55 --- a/lib/notmuch.h\r
56 +++ b/lib/notmuch.h\r
57 @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);\r
58   * Typical usage might be:\r
59   *\r
60   *     notmuch_message_t *message;\r
61 + *     notmuch_status_t status;\r
62   *     notmuch_tags_t *tags;\r
63   *     const char *tag;\r
64   *\r
65 - *     message = notmuch_database_find_message (database, message_id);\r
66 - *\r
67 - *     for (tags = notmuch_message_get_tags (message);\r
68 - *          notmuch_tags_valid (tags);\r
69 - *          notmuch_result_move_to_next (tags))\r
70 - *     {\r
71 - *         tag = notmuch_tags_get (tags);\r
72 - *         ....\r
73 + *     status = notmuch_database_find_message (database, message_id, &message);\r
74 + *     if(!status && message) {\r
75 + *          for (tags = notmuch_message_get_tags (message);\r
76 + *               notmuch_tags_valid (tags);\r
77 + *               notmuch_result_move_to_next (tags))\r
78 + *          {\r
79 + *               tag = notmuch_tags_get (tags);\r
80 + *               ....\r
81 + *          }\r
82 + *          notmuch_message_destroy (message);\r
83   *     }\r
84   *\r
85 - *     notmuch_message_destroy (message);\r
86 - *\r
87   * Note that there's no explicit destructor needed for the\r
88   * notmuch_tags_t object. (For consistency, we do provide a\r
89   * notmuch_tags_destroy function, but there's no good reason to call\r
90 -- \r
91 1.7.2.5\r
92 \r