From: David Bremner <david@tethera.net>
To: Franz Fellner <alpine.art.de@gmail.com>,
Lucas Hoffmann <luc.lists@gmail.com>,
notmuch@notmuchmail.org
Subject: Re: Bug: counting messages twice after excluding tags yields different results
Date: Wed, 31 Aug 2016 22:16:43 -0300 [thread overview]
Message-ID: <87a8fsl8qs.fsf@zancas.localnet> (raw)
In-Reply-To: <1.472.648.167-ner-3.768@TP_L520>
Franz Fellner <alpine.art.de@gmail.com> writes:
> On Wed, 31 Aug 2016 09:20:52 -0300, David Bremner <david@tethera.net> wrote:
>> Lucas Hoffmann <luc.lists@gmail.com> writes:
>>
>> > Thank you Franz, sadly your reply did not convince me:
>> >
>> > Quoting Franz Fellner (2016-08-31 11:21:18)
>> >> Your problem: the example sucks ;)
>> >
>> > No, I must object :(
>> >
>> >> If the query searches for a tag you also have in exclude_tags (in your
>> >> case: spam) the exclude gets ignored.
>> >
>> > Is that documented? Because it is not what I would expect.
>>
>> Yes, it is documented in notmuch-config(1)
>
> And for "destructiveness" see the implementation in lib/query.cc _notmuch_exclude_tags:
> It replaces every matching tag in query_string and exclude_tags with an empty string ""
> in the exclude terms. This most likely results in <match_all_documents> which can be
> seen as a bug, if you want; removing would be better but also more expensive.
Maybe more programming effort, but I guess not more expensive in
performance? It is not clear that this is worth fixing, since the
destructiveness makes re-using queries inadvisable. Are there any
non-destructive operations on queries (that it seems reasonable to
commit to being non-destructive)? Otherwise, I guess we could just add a
blanket warning to the API docs.
d
next prev parent reply other threads:[~2016-09-01 1:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 8:23 Bug: counting messages twice after excluding tags yields different results Lucas
2016-08-31 9:21 ` Franz Fellner
2016-08-31 11:16 ` Lucas Hoffmann
2016-08-31 12:20 ` David Bremner
2016-08-31 12:56 ` Franz Fellner
2016-09-01 1:16 ` David Bremner [this message]
2016-09-03 12:50 ` [PATCH] lib doc: group query functions, add disclaimer David Bremner
2016-09-05 10:57 ` Bug: counting messages twice after excluding tags yields different results David Bremner
2017-03-05 11:41 ` David Bremner
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=87a8fsl8qs.fsf@zancas.localnet \
--to=david@tethera.net \
--cc=alpine.art.de@gmail.com \
--cc=luc.lists@gmail.com \
--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).