On Sat, Jul 18, 2015 at 5:11 AM, Suvayu Ali <fatkasuvayu+li...@gmail.com> wrote: > Hi Lewis, > > On Fri, Jul 17, 2015 at 10:48:57AM -0500, J. Lewis Muir wrote: >> >> 1. Perhaps you are remembering the "no plain text" message incorrectly? >> For example, the message could have referred to "text/plain" or >> "plaintext" (no space). These would be sufficiently different to not >> match your grep pattern. > > True, but my puzzlement is notmuch shouldn't return those results in the > first place, since I provided a quoted string: "plain text", unless of > course I need to escape the quotes. Okay, just checked it, doesn't make > a difference in the number of hits from notmuch. > >> 2. Perhaps your email client rendered the "no plain text" message when >> it encountered an email with only a "text/html" content type? In >> this case, the "no plain text" (or whatever) message would not be >> present in the email itself since it would be generated by the email >> client when rendering the email. > > This is possible, but I use mutt. As far as I know, it doesn't do > "smart" things like that. I also recall looking at the mime parts > individually as I was surprised at the behaviour, and it was indeed a > useless text/plain part with that message. > >> 3. A really long shot, but could a line wrap have occurred after "plain" >> such that "text" appeared on the next line? Your grep pattern would >> not match that. > > Good point, I tried grepping for this instead: 'plain[[:space:]/]+text', > no luck. > > Thanks for your comments. > > Cheers, > > -- > Suvayu
Hi Suvayu, First note that I believe notmuch search is case insensitive by default, so your grep should be case insensitive as well. More importantly, I'm not sure how 'no NEAR "plain text" ' syntax is parsed. Maybe it is parsed as {no NEAR plain} or {text}. You would like to search for the exact phrase, correct? How about the following? notmuch search no adj plain adj text Best, Xu _______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch