On Fri, 21 Nov 2014, Olivier Berger <olivier.berger@telecom-sudparis.eu> wrote: > David Bremner <david@tethera.net> writes: > >> Olivier Berger <olivier.berger@telecom-sudparis.eu> writes: >> >>> >>> So, I've tried and removed the spam tag from the exclude_tags, and >>> suddenly, the search in emacs responds with the 981... which means that >>> most of the deleted ones had the spam tag too. >>> >>> >>> So it means that if one explicitely requests an excluded tag, other >>> exclude tags still apply. Not sure this is the desirable option : maybe >>> if one exclusion is waved, then others should too ? >>> >>> What do you think ? >> >> I'm not sure. What you suggest sounds sensible enough. On the other hand >> the way it behaves now is precisely as documented; I'm not sure whether >> this is because of a design choice or ease of implementation. Maybe Mark >> can comment further on that. I guess there are even people who >> like/rely on the current functionality, since there always are ;). This was definitely a design choice (I think probably by Austin/jrollins) and I think it makes sense: why would you want to include one include spam messages when you are searching for deleted messages? A change would break my setup - not in itself a problem as I setup this way to make sure I exercised the exclude code. I tag all my notmuch mailing list mail tag:notmuch and have that as an excluded tag. Then mailing list results do not clutter up results when I am doing personal searches. >> > > In any case, there has been a change in the way this worked. I don't think anyone has touched this code for over two years: git blame seems to suggest March 2012. > For the moment, I'm using the following saved search : > (tag:deleted or tag:spam) and tag:deleted > which will display the deleted mails. I do think it would be nice to have a clear way of turning excludes off in the emacs frontend. Without a query parser it's not clear what the best way to do it is: I suggested a hack which allowed --exclude=false to be passed as part of the search. We could add a toggle to rerun a search with exclude=false but that doesn't help much for saved searches or manually entered searches. Best wishes Mark