From cada329206ba8e8a56bc6c96104419f6ca7ec78a Mon Sep 17 00:00:00 2001 From: Suvayu Ali Date: Fri, 17 Jul 2015 14:11:11 +0200 Subject: [PATCH] Searching for phrases in the body of an email --- eb/de493bba472ca91a4db7cc470c2100fe620640 | 98 +++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 eb/de493bba472ca91a4db7cc470c2100fe620640 diff --git a/eb/de493bba472ca91a4db7cc470c2100fe620640 b/eb/de493bba472ca91a4db7cc470c2100fe620640 new file mode 100644 index 000000000..68b0096e4 --- /dev/null +++ b/eb/de493bba472ca91a4db7cc470c2100fe620640 @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 506566DE09FB + for ; Fri, 17 Jul 2015 05:11:18 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.133 +X-Spam-Level: +X-Spam-Status: No, score=-0.133 tagged_above=-999 required=5 tests=[AWL=0.687, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, + SPF_PASS=-0.001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0IUmEpgBHusn for ; + Fri, 17 Jul 2015 05:11:16 -0700 (PDT) +Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com + [209.85.212.178]) + by arlo.cworth.org (Postfix) with ESMTPS id 0195C6DE02B1 + for ; Fri, 17 Jul 2015 05:11:15 -0700 (PDT) +Received: by widjy10 with SMTP id jy10so39717917wid.1 + for ; Fri, 17 Jul 2015 05:11:14 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=sender:date:from:to:subject:message-id:mail-followup-to + :mime-version:content-type:content-disposition:user-agent; + bh=TKHDFS5cR6oYzOinvpzSBNPGFfYV4a4NAHLpYLWuKBo=; + b=ONWmzY2Fk/zQ8vo3EawivNKd/ptE+YrFJblxr/uCykpxqngZM8i8Lqgd0Dkc1/0WXx + efbidPkXCkn0Fi/jT3Ahsh+w1ZkYk8iKRu3VK7cEAhNS43m8gYG+I2k3fA0QO/MElxDQ + eNtCu8CIIUDhExm9c00nOpaxaIxuyegJy1O2rBPAxOgO+qvA+8pwo/x9BwQ8Z3z6rneP + 0BcBVWJAjv/9ipJw2Nuyhqv0OYgtjKyeREfvFOn4ElvP6x7I/RKnLDO0Z7HZN5hYwd+D + PRE3qw6KjIPANsOtri474eD4DN9s4nccq+4La6GGvdNKS1ZYs2WRc2tyMaYcr6AqZz5m + rD5Q== +X-Received: by 10.194.108.5 with SMTP id hg5mr30621320wjb.25.1437135073870; + Fri, 17 Jul 2015 05:11:13 -0700 (PDT) +Received: from chitra.no-ip.org ([2001:610:120:3001:2ad2:44ff:fe4a:b029]) + by smtp.gmail.com with ESMTPSA id b13sm8209813wic.15.2015.07.17.05.11.13 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 17 Jul 2015 05:11:13 -0700 (PDT) +Sender: Suvayu Ali +Date: Fri, 17 Jul 2015 14:11:11 +0200 +From: Suvayu Ali +To: Notmuch list +Subject: Searching for phrases in the body of an email +Message-ID: <20150717121111.GF25651@chitra.no-ip.org> +Mail-Followup-To: Notmuch list +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.23.1 (2014-03-12) +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 17 Jul 2015 12:11:18 -0000 + +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:000000000000a2a6 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:000000000000a2a6 | 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. -- 2.26.2