Hi :) so I found a weird bug with notmuch_query_add_tag_exclude. Apparently, when I exclude 'spam', and search for 'spam', I still get results, but if I exclude 'spam', and search for 'is_a_spam', I get no results, even though there are mails tagged with that tag. ~~~ snip ~~~ import notmuch d = notmuch.Database() q = d.create_query("tag:spam") q.exclude_tag("spam") assert len(list(q.search_messages())) > 0 q = d.create_query("tag:is_a_spam") assert len(list(q.search_messages())) > 0 q = d.create_query("tag:is_a_spam") q.exclude_tag("spam") assert len(list(q.search_messages())) > 0, "weird" ~~~ snip ~~~ % python3 ignore_tag_bug.py Traceback (most recent call last): File "ignore_tag_bug.py", line 13, in assert len(list(q.search_messages())) > 0, "weird" AssertionError: weird % notmuch --version notmuch 0.26 Cheers, Justus