From: Gaute Hope <eg@gaute.vetsj.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: notmuch_query_add_tag_excluded and notmuch_query_search_threads
Date: Sun, 07 Dec 2014 13:24:32 +0000 [thread overview]
Message-ID: <1417958519-astroid-0-ydniq6pte2-8575@strange> (raw)
In-Reply-To: <87388rfzhw.fsf@maritornes.cs.unb.ca>
Excerpts from David Bremner's message of December 7, 2014 12:52:
> Gaute Hope <eg@gaute.vetsj.com> writes:
>
>>
>> I would expect to have the thread matching, I get nothing however. It
>> does show up in: $ notmuch search tag:muted (muted added to excluded
>> tags), but does notmuch search operate with
>> notmuch_query_search_messages?
>>
>
> I expanded your sample into a full program, and it seems to work ok for
> me. Not sure what the difference might be.
>
> [...]
> query = notmuch_query_create (nm_db, "tag:muted");
> notmuch_query_add_tag_exclude (query, "muted");
> notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_TRUE);
printf("%d\n", notmuch_query_count_threads (query));
>
> for (threads = notmuch_query_search_threads (query);
> notmuch_threads_valid (threads);
> notmuch_threads_move_to_next (threads))
>
> [...]
Thanks,
I also did an notmuch_query_count_threads (query) as illustrated
above, this returns 0 and also results in the erroneous behavior below. Your code works as expected without the _count_threads() call.
regards, gaute
next prev parent reply other threads:[~2014-12-07 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 22:39 notmuch_query_add_tag_excluded and notmuch_query_search_threads Gaute Hope
2014-12-07 11:52 ` David Bremner
2014-12-07 13:24 ` Gaute Hope [this message]
2014-12-07 13:54 ` David Bremner
2014-12-07 14:29 ` Gaute Hope
2014-12-07 17:41 ` David Bremner
2014-12-08 17:17 ` Mark Walters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417958519-astroid-0-ydniq6pte2-8575@strange \
--to=eg@gaute.vetsj.com \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).