Fix count/search query destructiveness

Subject: Fix count/search query destructiveness

Date: Mon, 5 Sep 2016 12:48:01 -0300

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


As discussed in id:147263183913.27784.12274024193186585889@mbp, the
current behaviour is destructive due to exclude handling. This makes
some natural code, including notmuch-reply, buggy.

I haven't updated the library prototypes for const correctness, but
that would probably make sense. Before I go through that, I wanted to
get some feedback on the breaking change to
notmuch_query_add_tag_exclude.  Another option would be to add a (take
a breath) notmuch_query_add_tag_exclude_st and wrap that in
notmuch_query_add_tag_exclude. I decided not to go that route in this
initial series since effectively code calling the function as void
impliment this same status ignoring. It depends how terrible we think
bumping the SONAME is. [1]

[1]: If we're going to break the ABI, I'd like to do it soon to give
     Debian a chance to do a transition before the next stable release.q

Thread: