* exclude tags
@ 2014-05-16 17:12 Wael Nasreddine
2014-05-16 17:57 ` Kushal Kumaran
0 siblings, 1 reply; 2+ messages in thread
From: Wael Nasreddine @ 2014-05-16 17:12 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
Hey guys,
I am trying to exclude any thread that has the tag *killed* but it's
either a bug or something that I am simply doing wrong.
$ notmuch search tag:work and tag:unread and tag:inbox and not tag:killed | grep 'killed' | wc -l
1
I am getting the same result with Trusty shipped notmuch v0.17 and with
today's build.
Wael
[-- Attachment #2.1: Type: text/plain, Size: 80 bytes --]
--
Wael Nasreddine | SRE at Google | wael.nasreddine@gmail.com | (650) 735-1773
[-- Attachment #2.2: Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: exclude tags
2014-05-16 17:12 exclude tags Wael Nasreddine
@ 2014-05-16 17:57 ` Kushal Kumaran
0 siblings, 0 replies; 2+ messages in thread
From: Kushal Kumaran @ 2014-05-16 17:57 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 917 bytes --]
Wael Nasreddine <wael.nasreddine@gmail.com> writes:
> Hey guys,
>
> I am trying to exclude any thread that has the tag *killed* but it's
> either a bug or something that I am simply doing wrong.
>
> $ notmuch search tag:work and tag:unread and tag:inbox and not tag:killed | grep 'killed' | wc -l
> 1
>
> I am getting the same result with Trusty shipped notmuch v0.17 and with
> today's build.
>
Search works by matching messages. So if you have a thread with at
least one message which does not have that tag, that thread will still
show up in a "not tag:killed" search.
The way I maintain killed threads is to search for tag:killed, and then
call notmuch tag -inbox -unread for all those threads. Here's my code
to do this:
# killed threads
for th in $(notmuch search --output=threads -- tag:killed); do
notmuch tag -inbox -unread -new -- $th
done
--
regards,
kushal
[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-16 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 17:12 exclude tags Wael Nasreddine
2014-05-16 17:57 ` Kushal Kumaran
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).