--- /dev/null
+Return-Path: <rlb@defaultvalue.org>\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 44245429E22\r
+ for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 11:52:44 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 o+F704HYlbPC for <notmuch@notmuchmail.org>;\r
+ Sun, 20 Feb 2011 11:52:41 -0800 (PST)\r
+Received: from defaultvalue.org (defaultvalue.org [70.85.129.156])\r
+ by olra.theworths.org (Postfix) with ESMTP id DB003431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 20 Feb 2011 11:52:41 -0800 (PST)\r
+Received: from omen.defaultvalue.org (localhost [127.0.0.1])\r
+ by defaultvalue.org (Postfix) with ESMTP id 1F67E90D35;\r
+ Sun, 20 Feb 2011 13:52:59 -0600 (CST)\r
+Received: from raven.defaultvalue.org (raven.defaultvalue.org [192.168.1.7])\r
+ by omen.defaultvalue.org (Postfix) with ESMTP id 172A05022F;\r
+ Sun, 20 Feb 2011 13:52:41 -0600 (CST)\r
+Received: by raven.defaultvalue.org (Postfix, from userid 1000)\r
+ id 003077BA2C5; Sun, 20 Feb 2011 13:52:40 -0600 (CST)\r
+From: Rob Browning <rlb@defaultvalue.org>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: Folder search semantics\r
+References: <1295165458-9573-1-git-send-email-amdragon@mit.edu>\r
+ <20110202050336.GB28537@mit.edu> <87sjw6hx2l.fsf@yoom.home.cworth.org>\r
+ <20110203061429.GD28537@mit.edu>\r
+Date: Sun, 20 Feb 2011 13:52:40 -0600\r
+In-Reply-To: <20110203061429.GD28537@mit.edu> (Austin Clements's message of\r
+ "Thu, 3 Feb 2011 01:14:29 -0500")\r
+Message-ID: <87r5b24h6f.fsf@raven.defaultvalue.org>\r
+User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Sun, 20 Feb 2011 19:52:44 -0000\r
+\r
+Austin Clements <amdragon@MIT.EDU> writes:\r
+\r
+> As a consequence, all folders are subfolders of the inbox. With\r
+> recursive search, a search for your inbox folder returns *all* of your\r
+> messages. I wasn't trying to say that we shouldn't support recursive\r
+> search (I'm all for flexibility), but it's a confusing default for\r
+> Maildir++ because of this.\r
+>\r
+> Maildir++ has the added twist that the inbox folder has no name. As a\r
+> result, currently notmuch can't search for a Maildir++ inbox folder,\r
+> which needs to be addressed somehow. The least surprising approach\r
+> would compatibility with the Maildir++ convention of calling the\r
+> top-level folder INBOX, the subfolder INBOX.work, etc.\r
+\r
+Just adding my agreement here. With recursion and no anchors, "folder:"\r
+really won't work for the inbox for Maildir++.\r
+\r
+> Maildir++ issues aside, I submit that rooted, non-recursive folder\r
+> searches are a more natural default with a more conventional syntactic\r
+> extension to non-rooted/recursive searches. In\r
+> id:87aaiy3u65.fsf@yoom.home.cworth.org, you mentioned that you\r
+> implemented non-rooted folder search to mimic subject search. But file\r
+> system paths are not natural language like subject lines. File system\r
+> paths are hierarchical and rooted.\r
+>\r
+> Of course, special query operators like ^ and $ can mitigate this, but\r
+> these queries *aren't* regexps and, furthermore, people don't usually\r
+> apply regexps to file names. They apply globs. Glob syntax has the\r
+> added benefit of congruity with Xapian wildcard syntax. This naturally\r
+> leads to a rooted, non-recursive syntax by default (like globs), where a\r
+> * at the end means recursive and a * at the beginning means non-rooted.\r
+> In fact, we could easily generalize this to arbitrary shell globs.\r
+\r
+I agree with all of this. Something like fnmatch() sounds appropriate\r
+to me. In fact, I'd suggest that we implement this very much like\r
+fnmatch() with folder references like paths -- where "/" is always the\r
+separator, regardless of how things are handled in the underlying\r
+storage. So depending on the backend, foo/bar could refer to\r
+"Maildir/foo/bar" or "Maildir/.foo.bar".\r
+\r
+And personally, I think I'd prefer that folder: be anchored by default,\r
+so that folder:work means "the top-level folder named work", but it's\r
+not a big deal to me as long as there's a fairly easy way to specify\r
+exactly what I want.\r
+\r
+-- \r
+Rob Browning\r
+rlb @defaultvalue.org and @debian.org\r
+GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4\r