Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 9b / e98e3121296919935eb4052f9747697534cc1f
1 Return-Path: <camalot@picnicpark.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 26F86431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 22:27:35 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id MzmTKJXbsZ7D for <notmuch@notmuchmail.org>;\r
16         Mon, 22 Sep 2014 22:27:30 -0700 (PDT)\r
17 Received: from picnicpark.org (picnicpark.org [130.94.181.238])\r
18         by olra.theworths.org (Postfix) with ESMTP id 873C3431FAE\r
19         for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 22:27:30 -0700 (PDT)\r
20 Received: (qmail 53178 invoked by uid 13806); 23 Sep 2014 05:27:29 -0000\r
21 Received: from unknown (HELO gw.picnicpark.org) ([108.225.17.54])\r
22         (envelope-sender <camalot@picnicpark.org>)\r
23         by 130.94.181.238 (qmail-ldap-1.03) with SMTP\r
24         for <aclements@csail.mit.edu>; 23 Sep 2014 05:27:29 -0000\r
25 Received: from friend.picnicpark.org (friend.picnicpark.org [192.168.35.1])\r
26         by gw.picnicpark.org (Postfix) with ESMTPSA id 8D71112A0D9D;\r
27         Mon, 22 Sep 2014 22:27:29 -0700 (PDT)\r
28 Message-ID: <1411450049.1931.93.camel@picnicpark.org>\r
29 Subject: Re: Do path: searches handle spaces correctly?\r
30 From: Keith Amidon <camalot@picnicpark.org>\r
31 To: Austin Clements <aclements@csail.mit.edu>\r
32 Date: Mon, 22 Sep 2014 22:27:29 -0700\r
33 In-Reply-To: <20140922150607.GA7970@csail.mit.edu>\r
34 References: <878uleklvt.fsf@awakenetworks.com>\r
35         <87tx40ggf1.fsf@maritornes.cs.unb.ca>\r
36         <1411396931.1931.91.camel@picnicpark.org>\r
37         <20140922150607.GA7970@csail.mit.edu>\r
38 Content-Type: text/plain; charset="UTF-8"\r
39 X-Mailer: Evolution 3.12.5 \r
40 Mime-Version: 1.0\r
41 Content-Transfer-Encoding: 7bit\r
42 Cc: notmuch@notmuchmail.org\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Tue, 23 Sep 2014 05:27:35 -0000\r
56 \r
57 On Mon, 2014-09-22 at 15:06 +0000, Austin Clements wrote:\r
58 > I assume you're doing this from the command line?  Does the following\r
59 > work?\r
60\r
61 > notmuch search --output=files 'path:"dir/INBOX/INBOX/Sent Items/**"'\r
62\r
63 > Shell quoting and Xapian quoting interact in often confusing ways.  In\r
64 > your original command line, the single quotes suppress shell argument\r
65 > splitting, but never make it to notmuch, so notmuch sees two search\r
66 > terms "path:dir/INBOX/INBOX/Sent" and "Items/**".  In the command line\r
67 > I suggested, the single quotes play the same role, but for the entire\r
68 > query.  Because of the quoting, notmuch *does* see the inner double\r
69 > quotes, which makes the path a single term (note that Xapian only\r
70 > accepts double quotes, not single quotes).  In general, it's good to\r
71 > enclose the entire command line query in single quotes so shell\r
72 > parsing doesn't get in the way of query parsing.\r
73 \r
74 Bingo.  That was it.  Thanks for clarifying how the quoting interacts. \r
75 \r
76 What do you think about adding a section to the notmuch-search-terms web\r
77 page that talks in more detail about the quoting interactions?  If there\r
78 were on obvious section about this in the man page it might have helped\r
79 me find the issue myself.  If this seems like a good idea I'll take a\r
80 crack at it later this week when I get time to research the Xapian\r
81 quoting in a bit more detail.\r
82 \r
83         --- Keith\r
84 \r