Re: notmuch-tree display
[notmuch-archives.git] / 8e / 90cb754a8aaf89dcad450de579348364eb0001
1 Return-Path: <james@hackervisions.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 7F8DF431FBD\r
6         for <notmuch@notmuchmail.org>; Wed, 31 Oct 2012 09:43:33 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] 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 J5fa0-B9LvKK for <notmuch@notmuchmail.org>;\r
16         Wed, 31 Oct 2012 09:43:32 -0700 (PDT)\r
17 Received: from mail.sflc.info (mail.sflc.info [207.86.247.70])\r
18         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id CA89E431FBC\r
21         for <notmuch@notmuchmail.org>; Wed, 31 Oct 2012 09:43:32 -0700 (PDT)\r
22 Received: from localhost (ool-457af02d.dyn.optonline.net [69.122.240.45])\r
23         by mail.sflc.info (Postfix) with ESMTPSA id 8D377B4C019\r
24         for <notmuch@notmuchmail.org>; Wed, 31 Oct 2012 16:43:30 +0000 (UTC)\r
25 From: James Vasile <james@hackervisions.org>\r
26 To: notmuch mailing list <notmuch@notmuchmail.org>\r
27 Subject: [PATCH] fix notmuch_database_open call in addrlookup\r
28 User-Agent: Notmuch/0.14+96~gb732e1b (http://notmuchmail.org) Emacs/23.4.1\r
29         (i486-pc-linux-gnu)\r
30 Date: Wed, 31 Oct 2012 12:43:24 -0400\r
31 Message-ID: <87ip9q4moj.fsf@hackervisions.org>\r
32 MIME-Version: 1.0\r
33 Content-Type: multipart/signed; boundary="=-=-=";\r
34         micalg=pgp-sha1; protocol="application/pgp-signature"\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Wed, 31 Oct 2012 16:43:33 -0000\r
48 \r
49 --=-=-=\r
50 Content-Transfer-Encoding: quoted-printable\r
51 \r
52 What's the best way to submit changes to addrlookup?  Right now, it is\r
53 out of date vs the latest libnotmuch.  The addrlookup repo is vala code\r
54 but the wiki [1] points to a generated c file [2].\r
55 \r
56 [1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup=\r
57 .c\r
58 [2] http://notmuchmail.org/emacstips/\r
59 \r
60 At any rate, a patch to that c file is below.  If you upgraded notmuch\r
61 and now addrlookup gives errors about not finding libnotmuch.so.2, this\r
62 patch might be what you need.\r
63 \r
64 \r
65 \r
66 \r
67 \r
68 In the latest version of notmuch in git, notmuch_database_open returns a\r
69 status and takes what used to be the return value as a reference\r
70 parameter.  This patch adjusts code to pass the db pointer in a\r
71 parameter and accept the status as return value.  We don't do anything\r
72 with the status at present.\r
73 \r
74 =2D--\r
75  addrlookup.c |    4 +++-\r
76  1 file changed, 3 insertions(+), 1 deletion(-)\r
77 \r
78 diff --git a/addrlookup.c b/addrlookup.c\r
79 index 5f724ef..aed77e7 100644\r
80 =2D-- a/addrlookup.c\r
81 +++ b/addrlookup.c\r
82 @@ -804,12 +804,14 @@ void address_matcher_run (AddressMatcher* self, const=\r
83  gchar* name) {\r
84         gchar** _result_;\r
85         gint _result__length1;\r
86         gint __result__size_;\r
87 +       notmuch_status_t status;\r
88 +\r
89         g_return_if_fail (self !=3D NULL);\r
90         _tmp0_ =3D g_new0 (notmuch_query_t*, 0);\r
91         queries =3D _tmp0_;\r
92         queries_length1 =3D 0;\r
93         _queries_size_ =3D 0;\r
94 =2D       _tmp1_ =3D notmuch_database_open (self->priv->user_db_path, NOTMU=\r
95 CH_DATABASE_MODE_READ_ONLY);\r
96 +       status =3D notmuch_database_open (self->priv->user_db_path, NOTMUCH=\r
97 _DATABASE_MODE_READ_ONLY, &_tmp1_);\r
98         _notmuch_database_close0 (self->priv->db);\r
99         self->priv->db =3D _tmp1_;\r
100         _tmp2_ =3D g_strconcat ("tag:", self->priv->user_addrbook_tag, NULL=\r
101 );\r
102 =2D-=20\r
103 1.7.10.4\r
104 \r
105 \r
106 --=-=-=\r
107 Content-Type: application/pgp-signature\r
108 \r
109 -----BEGIN PGP SIGNATURE-----\r
110 Version: GnuPG v1.4.12 (GNU/Linux)\r
111 \r
112 iQEcBAEBAgAGBQJQkVUsAAoJECaDklOuuidYZEIIALQf0e+hpCChYhsMbJzx7z8j\r
113 nNllHMMv+wEdBZ/9CmEUI1zq1nlKhqef0VIU81xVvbNxZoLmj9qGn23/rNkre0t8\r
114 BKq7HgvKVjGsenEoDXyRIaqJJItCuij8ZgHCjJMK65WTC3/vqZ/FXkcYBcTH3u3U\r
115 DbcL3QrMsdjG/m7ElU3BO0mIURVFvYUPrGGKlKXO6eFqkQssCjBUTQe6R9+w/qQl\r
116 J4kO93v8OO3f/CLESK4lyrWMUp8IeT3dULDXGLpLPODJHq/afxpXxz7A+kp9vbOK\r
117 +5EZ3pfvyQSAsoVkojausGuHx0TT3jtL3ayBpBs8wN+LdD+2ztVXVYT2UN7nFZ0=\r
118 =ncCo\r
119 -----END PGP SIGNATURE-----\r
120 --=-=-=--\r