Re: correct way to search for only PDF attachments
authorSuvayu Ali <fatkasuvayu+linux@gmail.com>
Tue, 29 Sep 2015 07:15:18 +0000 (09:15 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:41 +0000 (14:49 -0700)
a2/498d797baa308ee1f0c2fcab56f523a787af81 [new file with mode: 0644]

diff --git a/a2/498d797baa308ee1f0c2fcab56f523a787af81 b/a2/498d797baa308ee1f0c2fcab56f523a787af81
new file mode 100644 (file)
index 0000000..e494331
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <fatkasuvayu+linux@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 595096DE0274\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Sep 2015 00:15:27 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.719\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.719 tagged_above=-999 required=5 tests=[AWL=0.101,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\r
+ SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Y8xi7JBXOqhb for <notmuch@notmuchmail.org>;\r
+ Tue, 29 Sep 2015 00:15:25 -0700 (PDT)\r
+Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com\r
+ [209.85.212.177])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 47A216DE00CB\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Sep 2015 00:15:25 -0700 (PDT)\r
+Received: by wicfx3 with SMTP id fx3so136025187wic.1\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Sep 2015 00:15:22 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=sender:date:from:to:subject:message-id:mail-followup-to:references\r
+ :mime-version:content-type:content-disposition:in-reply-to\r
+ :user-agent; bh=eGQWYUoy7Osa2KtLHD54YHVpJOBd98yZKjj/F6Zq010=;\r
+ b=vdchQKPQGZ4UyLWrcBcWKTbSf0eXs9knLPXFfEuo71/JuefB6qGnlZsLIG8zp09Cdl\r
+ eYHgKRLNrYUXYQs4Vmx8Gfb415HFW6XJUeKDgdtVs4SiSh+atJv/IfXg5m3F2cK/Iob6\r
+ w7zCILnzYNRJQygV+dDqATdWbNhUJexNsnidbrQ8BYsH6MwYEGVkNXwyGrp2o8SIK6WP\r
+ Wuyzn9nDxF4OmLsSERl3SV5qD3YaqwB+MoRXYIc+1BNr98CRFxK2HWAJRkCH3i78E6km\r
+ vpZaeKrMOr8ROG6HE/E9hepP9167n9Q2Fk7MZO2MyqtKhSdNDrmAFwtxiNgH1ahuo/GM\r
+ i0Sw==\r
+X-Received: by 10.180.188.211 with SMTP id gc19mr24815441wic.81.1443510921969;\r
+  Tue, 29 Sep 2015 00:15:21 -0700 (PDT)\r
+Received: from chitra.no-ip.org (5072840E.static.ziggozakelijk.nl.\r
+ [80.114.132.14])\r
+ by smtp.gmail.com with ESMTPSA id r4sm22181632wia.19.2015.09.29.00.15.20\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Tue, 29 Sep 2015 00:15:20 -0700 (PDT)\r
+Sender: Suvayu Ali <fatkasuvayu@gmail.com>\r
+Date: Tue, 29 Sep 2015 09:15:18 +0200\r
+From: Suvayu Ali <fatkasuvayu+linux@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: correct way to search for only PDF attachments\r
+Message-ID: <20150929071518.GA20628@chitra.no-ip.org>\r
+Mail-Followup-To: notmuch@notmuchmail.org\r
+References:\r
+ <CAJhTkNgwX8cmsKfJGV+x7HHMXPNZvXFXO=KZzLvrcWCGrDL=Pg@mail.gmail.com>\r
+ <87vbau9e8i.fsf@wondoo.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87vbau9e8i.fsf@wondoo.home.cworth.org>\r
+User-Agent: Mutt/1.5.23.1 (2014-03-12)\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 29 Sep 2015 07:15:27 -0000\r
+\r
+On Mon, Sep 28, 2015 at 07:00:13PM -0700, Carl Worth wrote:\r
+> On Mon, Sep 28 2015, Xu Wang wrote:\r
+> \r
+> > To understand more, what does the following search for?\r
+> >\r
+> > from:jongho attachment:.*pdf\r
+> \r
+> Uhm, probably only strange things. There are some mechanisms for getting\r
+> notmuch to emit some debugging information on what the final search\r
+> terms end up being, (but I don't recall if they still require\r
+> recompilation or not).\r
+\r
+This should work:\r
+\r
+  $ export NOTMUCH_DEBUG_QUERY=1\r
+  $ notmuch count -- from:suvayu attachment:*.pdf\r
+  Query string is:\r
+  from:suvayu attachment:*.pdf\r
+  Exclude query is:\r
+  Xapian::Query()\r
+  Final query is:\r
+  Xapian::Query((Tmail AND ZXFROMsuvayu:(pos=1) AND Zattach:(pos=2) AND Zpdf:(pos=3)))\r
+  217\r
+  $ notmuch count -- from:suvayu attachment:pdf\r
+  Query string is:\r
+  from:suvayu attachment:pdf\r
+  Exclude query is:\r
+  Xapian::Query()\r
+  Final query is:\r
+  Xapian::Query((Tmail AND ZXFROMsuvayu:(pos=1) AND ZXATTACHMENTpdf:(pos=2)))\r
+  151\r
+\r
+I guess to answer the OP's question, the globbed form simply does a text\r
+search of attach and pdf.  The keyword is not recognised at all.\r
+\r
+Cheers,\r
+\r
+-- \r
+Suvayu\r
+\r
+Open source is the future. It sets us free.\r