Searching for phrases in the body of an email
Hi, I'm trying to find those annoying emails which have useless plain text parts. As I recall, they had a phrase something along the lines of "not available in plain text" or "no plain text". So of course I searched for "plain text". But that returns hundreds of messages with no obvious matches, I can't even find the phrase "plain text" in the body for most of the results! Here is an example: $ notmuch search --limit=1 -- no NEAR "plain text" thread:a2a6 Sat. 00:30 [1/1] NASA Jet Propulsion Laboratory; NASA's Curiosity Mars Rover Tracks Sunspots (2015 2015-07 inbox) $ notmuch show --format=raw -- thread:a2a6 | grep 'plain text' $ To make this stranger, here are more numbers: $ notmuch show -- $(notmuch search --output=messages -- no NEAR "plain text") | \ grep -c -e 'plain text' 7 $ notmuch count -- no NEAR "plain text" 461 I do not understand this at all! Any thoughts? Thanks in advance, -- Suvayu Open source is the future. It sets us free.
Searching for phrases in the body of an email
On 7/17/15 7:11 AM, Suvayu Ali wrote: > Hi, > > I'm trying to find those annoying emails which have useless plain > text parts. As I recall, they had a phrase something along the lines > of "not available in plain text" or "no plain text". So of course I > searched for "plain text". But that returns hundreds of messages with > no obvious matches, I can't even find the phrase "plain text" in the > body for most of the results! [snip] > I do not understand this at all! Any thoughts? Hello, Suvayu. I can't speak to the notmuch search results since I actually don't have experience with it (I'm planning to switch my email setup to using notmuch, but I actually haven't switched yet!), but I can give a few ideas for some of your puzzlements: 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. 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. 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. Regards, Lewis
Re: Searching for phrases in the body of an email
On 7/17/15 7:11 AM, Suvayu Ali wrote: > Hi, > > I'm trying to find those annoying emails which have useless plain > text parts. As I recall, they had a phrase something along the lines > of "not available in plain text" or "no plain text". So of course I > searched for "plain text". But that returns hundreds of messages with > no obvious matches, I can't even find the phrase "plain text" in the > body for most of the results! [snip] > I do not understand this at all! Any thoughts? Hello, Suvayu. I can't speak to the notmuch search results since I actually don't have experience with it (I'm planning to switch my email setup to using notmuch, but I actually haven't switched yet!), but I can give a few ideas for some of your puzzlements: 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. 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. 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. Regards, Lewis ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Searching for phrases in the body of an email
Hi, I'm trying to find those annoying emails which have useless plain text parts. As I recall, they had a phrase something along the lines of "not available in plain text" or "no plain text". So of course I searched for "plain text". But that returns hundreds of messages with no obvious matches, I can't even find the phrase "plain text" in the body for most of the results! Here is an example: $ notmuch search --limit=1 -- no NEAR "plain text" thread:a2a6 Sat. 00:30 [1/1] NASA Jet Propulsion Laboratory; NASA's Curiosity Mars Rover Tracks Sunspots (2015 2015-07 inbox) $ notmuch show --format=raw -- thread:a2a6 | grep 'plain text' $ To make this stranger, here are more numbers: $ notmuch show -- $(notmuch search --output=messages -- no NEAR "plain text") | \ grep -c -e 'plain text' 7 $ notmuch count -- no NEAR "plain text" 461 I do not understand this at all! Any thoughts? Thanks in advance, -- Suvayu Open source is the future. It sets us free. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch