notmuch search --output=files error with AND NOT search terms

Mark Walters markwalters1009 at gmail.com
Tue Jul 9 11:37:46 PDT 2013


Hi

> Hi list,
>
> I am trying to check for mails, that are tagged differently from their 
> mailfolder.
>
> So I am searching like this, for example:
>
>      notmuch search   folder:1_Personal AND NOT tag:1_Personal
>      thread:0000000000005613   2008-01-15 [1/1] KIKIDAN News; kikidan 
> news 2008/01: Willkommen im neuen Jahr (inbox to-me)
>
> That's OK, but if I want to get the file name of the message, suddenly 
> get another message, which isn't located in the 1_Personal folder at all.
>
>      notmuch search --output=files   folder:1_Personal AND NOT 
> tag:1_Personal
> /home/ianus/Mail/ingo-2b1-de/INBOX/cur/1362131239_2.9026.cordraconis,U=33535,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S
> /home/ianus/Mail/ingo-2b1-de/1_Personal/cur/1361052415_0.30588.cordraconis,U=755,FMD5=2bd412d62930ab474a218128a61bdb68:2,S
>

The most likely cause is that these two messagefiles have the same
message-ids (so in notmuch's view are the same message). Try

notmuch search --output=messages  folder:1_Personal AND NOT tag:1_Personal

If you only see one message-id then notmuch thinks there is a single message
that matches the search. The way notmuch works is that it first finds
which messages match and then prints the requested information for those
messages. So in this case it finds the matching message(s) then prints
all filenames for those matching messages.

There are some patches floating around for improvements to the manpage
but they haven't been applied/reviewed yet.

Best wishes

Mark


>
> Kind regards,
>
> Ingo
>
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list