--- /dev/null
+Return-Path: <aclements@csail.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 158B4431FC0\r
+ for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 08:06:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id GU-HI0lTHCn7 for <notmuch@notmuchmail.org>;\r
+ Mon, 22 Sep 2014 08:06:10 -0700 (PDT)\r
+Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
+ by olra.theworths.org (Postfix) with ESMTP id E2287431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 08:06:10 -0700 (PDT)\r
+Received: from [104.131.20.129] (helo=awakeningjr)\r
+ by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)\r
+ (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
+ id 1XW5Bo-0005xt-JK; Mon, 22 Sep 2014 11:06:08 -0400\r
+Received: from amthrax by awakeningjr with local (Exim 4.84)\r
+ (envelope-from <aclements@csail.mit.edu>)\r
+ id 1XW5Bn-0005uR-PB; Mon, 22 Sep 2014 15:06:07 +0000\r
+Date: Mon, 22 Sep 2014 15:06:07 +0000\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: Keith Amidon <camalot@picnicpark.org>\r
+Subject: Re: Do path: searches handle spaces correctly?\r
+Message-ID: <20140922150607.GA7970@csail.mit.edu>\r
+References: <878uleklvt.fsf@awakenetworks.com>\r
+ <87tx40ggf1.fsf@maritornes.cs.unb.ca>\r
+ <1411396931.1931.91.camel@picnicpark.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1411396931.1931.91.camel@picnicpark.org>\r
+User-Agent: Mutt/1.5.23 (2014-03-12)\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Mon, 22 Sep 2014 15:06:15 -0000\r
+\r
+Quoth Keith Amidon on Sep 22 at 7:42 am:\r
+> On Mon, 2014-09-22 at 11:20 +0200, David Bremner wrote:\r
+> > Keith Amidon <keith@awakenetworks.com> writes:\r
+> > >\r
+> > > notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items'\r
+> > >\r
+> > > I don't get any results, but it seems like the two results above should\r
+> > > be shown, right? Am I doing something wrong here? If it looks like I'm\r
+> > > doing it correctly, what can I do to help troubleshoot the issue?\r
+> > \r
+> > Note that path:, unlike folder:, does not add the maildir subdirs. Dunno\r
+> > if that's the only issue you are having, but I guess it's one.\r
+> \r
+> Darn it! I made a mistake in my original email. In the test I was\r
+> doing I actually had:\r
+> \r
+> notmuch search --output=files path:'dir/INBOX/INBOX/Sent Items/**'\r
+> \r
+> which I believe should have picked up all the subdirectory paths. I\r
+> just retested to make sure that it still didn't work, and it doesn't.\r
+> \r
+> Am I still missing something? Thanks for the help, Keith\r
+\r
+I assume you're doing this from the command line? Does the following\r
+work?\r
+\r
+notmuch search --output=files 'path:"dir/INBOX/INBOX/Sent Items/**"'\r
+\r
+Shell quoting and Xapian quoting interact in often confusing ways. In\r
+your original command line, the single quotes suppress shell argument\r
+splitting, but never make it to notmuch, so notmuch sees two search\r
+terms "path:dir/INBOX/INBOX/Sent" and "Items/**". In the command line\r
+I suggested, the single quotes play the same role, but for the entire\r
+query. Because of the quoting, notmuch *does* see the inner double\r
+quotes, which makes the path a single term (note that Xapian only\r
+accepts double quotes, not single quotes). In general, it's good to\r
+enclose the entire command line query in single quotes so shell\r
+parsing doesn't get in the way of query parsing.\r