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 6C4216DE0AF8 for ; Sat, 18 Jul 2015 07:54:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.575 X-Spam-Level: X-Spam-Status: No, score=-0.575 tagged_above=-999 required=5 tests=[AWL=-0.005, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, 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 BbKgAfKBtY7c for ; Sat, 18 Jul 2015 07:54:33 -0700 (PDT) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by arlo.cworth.org (Postfix) with ESMTPS id 8DA436DE0352 for ; Sat, 18 Jul 2015 07:54:33 -0700 (PDT) Received: by oihq81 with SMTP id q81so86387694oih.2 for ; Sat, 18 Jul 2015 07:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=X+8C+i1fhld7Q+Y0zp3hJ+0serYpVaEGWQ8HEnqQ2NI=; b=cNM7geR4SwYo5dFWQjLA0VBmZqFE0zPVk1mNCwAq7HSwVQCbTTCpYLbcNCZr9WN1GV hU4iMMNLQkBG1YYmaQ9+YpAw73XCdk8gX23ihr1qkDXDBO9te7S/cYPBZRmbq4EXuJnu e2ViSFwEnHMJDpks2nIy9S320M/sguWNG2KxoA9IfBgIYFsu9dbsZBeRJNpV81riKwZz bNJxFRLQw9xiDMtijbchFvOkWYZqFByhRaERo50jt5r6xmcdOhEtYimvCM9/umDSxaI5 EgV8Vm4Oi630l6W+HNmmUjHWVYkm+uBhOX8GvbTM1bAS2cFOloxgnAMAVTdyEXMdoHor lGyQ== MIME-Version: 1.0 X-Received: by 10.202.229.66 with SMTP id c63mr17550367oih.57.1437231270434; Sat, 18 Jul 2015 07:54:30 -0700 (PDT) Received: by 10.182.241.167 with HTTP; Sat, 18 Jul 2015 07:54:30 -0700 (PDT) In-Reply-To: <20150718091139.GB8311@chitra.no-ip.org> References: <20150717121111.GF25651@chitra.no-ip.org> <55A923E9.5070509@imca-cat.org> <20150718091139.GB8311@chitra.no-ip.org> Date: Sat, 18 Jul 2015 10:54:30 -0400 Message-ID: Subject: Re: Searching for phrases in the body of an email From: Xu Wang To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 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: Sat, 18 Jul 2015 14:54:35 -0000 On Sat, Jul 18, 2015 at 5:11 AM, Suvayu Ali 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