unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] fix notmuch_database_open call in addrlookup
@ 2012-10-31 16:43 James Vasile
  2012-11-06  4:01 ` Ethan Glasser-Camp
  0 siblings, 1 reply; 4+ messages in thread
From: James Vasile @ 2012-10-31 16:43 UTC (permalink / raw)
  To: notmuch mailing list

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

What's the best way to submit changes to addrlookup?  Right now, it is
out of date vs the latest libnotmuch.  The addrlookup repo is vala code
but the wiki [1] points to a generated c file [2].

[1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup.c
[2] http://notmuchmail.org/emacstips/

At any rate, a patch to that c file is below.  If you upgraded notmuch
and now addrlookup gives errors about not finding libnotmuch.so.2, this
patch might be what you need.





In the latest version of notmuch in git, notmuch_database_open returns a
status and takes what used to be the return value as a reference
parameter.  This patch adjusts code to pass the db pointer in a
parameter and accept the status as return value.  We don't do anything
with the status at present.

---
 addrlookup.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/addrlookup.c b/addrlookup.c
index 5f724ef..aed77e7 100644
--- a/addrlookup.c
+++ b/addrlookup.c
@@ -804,12 +804,14 @@ void address_matcher_run (AddressMatcher* self, const gchar* name) {
        gchar** _result_;
        gint _result__length1;
        gint __result__size_;
+       notmuch_status_t status;
+
        g_return_if_fail (self != NULL);
        _tmp0_ = g_new0 (notmuch_query_t*, 0);
        queries = _tmp0_;
        queries_length1 = 0;
        _queries_size_ = 0;
-       _tmp1_ = notmuch_database_open (self->priv->user_db_path, NOTMUCH_DATABASE_MODE_READ_ONLY);
+       status = notmuch_database_open (self->priv->user_db_path, NOTMUCH_DATABASE_MODE_READ_ONLY, &_tmp1_);
        _notmuch_database_close0 (self->priv->db);
        self->priv->db = _tmp1_;
        _tmp2_ = g_strconcat ("tag:", self->priv->user_addrbook_tag, NULL);
-- 
1.7.10.4


[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix notmuch_database_open call in addrlookup
  2012-10-31 16:43 [PATCH] fix notmuch_database_open call in addrlookup James Vasile
@ 2012-11-06  4:01 ` Ethan Glasser-Camp
  2012-11-07 14:20   ` James Vasile
  0 siblings, 1 reply; 4+ messages in thread
From: Ethan Glasser-Camp @ 2012-11-06  4:01 UTC (permalink / raw)
  To: James Vasile, notmuch mailing list

James Vasile <james@hackervisions.org> writes:

> What's the best way to submit changes to addrlookup?  Right now, it is
> out of date vs the latest libnotmuch.  The addrlookup repo is vala code
> but the wiki [1] points to a generated c file [2].
>
> [1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup.c
> [2] http://notmuchmail.org/emacstips/
>
> At any rate, a patch to that c file is below.  If you upgraded notmuch
> and now addrlookup gives errors about not finding libnotmuch.so.2, this
> patch might be what you need.

I'd try to contact the author of the code, perhaps by submitting an
issue or pull request on the github page for the project. I'm sure he'd
prefer a patch to the Vala source.

Ethan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix notmuch_database_open call in addrlookup
  2012-11-06  4:01 ` Ethan Glasser-Camp
@ 2012-11-07 14:20   ` James Vasile
  2012-11-08  1:45     ` James Vasile
  0 siblings, 1 reply; 4+ messages in thread
From: James Vasile @ 2012-11-07 14:20 UTC (permalink / raw)
  To: Ethan Glasser-Camp, notmuch mailing list

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> writes:

> James Vasile <james@hackervisions.org> writes:
>
>> What's the best way to submit changes to addrlookup?  Right now, it is
>> out of date vs the latest libnotmuch.  The addrlookup repo is vala code
>> but the wiki [1] points to a generated c file [2].
>>
>> [1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup.c
>> [2] http://notmuchmail.org/emacstips/
>>
>> At any rate, a patch to that c file is below.  If you upgraded notmuch
>> and now addrlookup gives errors about not finding libnotmuch.so.2, this
>> patch might be what you need.
>
> I'd try to contact the author of the code, perhaps by submitting an
> issue or pull request on the github page for the project. I'm sure he'd
> prefer a patch to the Vala source.
>
> Ethan

Thanks, will do.  My vala is weak, so a patch to the vala source is
unlikely to make it to the front of my queue this year.  I'll ping
Sebastian Spaeth directly and via github.

-J

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix notmuch_database_open call in addrlookup
  2012-11-07 14:20   ` James Vasile
@ 2012-11-08  1:45     ` James Vasile
  0 siblings, 0 replies; 4+ messages in thread
From: James Vasile @ 2012-11-08  1:45 UTC (permalink / raw)
  To: Ethan Glasser-Camp, notmuch mailing list

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

James Vasile <james@hackervisions.org> writes:
> Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> writes:
>
>> James Vasile <james@hackervisions.org> writes:
>>
>>> What's the best way to submit changes to addrlookup?  Right now, it is
>>> out of date vs the latest libnotmuch.  The addrlookup repo is vala code
>>> but the wiki [1] points to a generated c file [2].
>>>
>>> [1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup.c
>>> [2] http://notmuchmail.org/emacstips/
>>>
>>> At any rate, a patch to that c file is below.  If you upgraded notmuch
>>> and now addrlookup gives errors about not finding libnotmuch.so.2, this
>>> patch might be what you need.
>>
>> I'd try to contact the author of the code, perhaps by submitting an
>> issue or pull request on the github page for the project. I'm sure he'd
>> prefer a patch to the Vala source.
>>
>> Ethan
>
> Thanks, will do.  My vala is weak, so a patch to the vala source is
> unlikely to make it to the front of my queue this year.  I'll ping
> Sebastian Spaeth directly and via github.
>
> -J

Just to close the loop: I contacted Sebastian and he applied my patch.
I tested the instructions on the wiki and confirmed they are currently
correct against his tree.  He notes that he doesn't currently have time
to monitor the list closely.

Thanks,
-J

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-08  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 16:43 [PATCH] fix notmuch_database_open call in addrlookup James Vasile
2012-11-06  4:01 ` Ethan Glasser-Camp
2012-11-07 14:20   ` James Vasile
2012-11-08  1:45     ` James Vasile

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).