From: Austin Clements Date: Sat, 29 Sep 2012 16:12:18 +0000 (+2000) Subject: Re: Searching from a folder X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1245cd8e04a6fd8d60262b8699b6a8b96fc6abc8;p=notmuch-archives.git Re: Searching from a folder --- diff --git a/23/29ea1faa1ac7962f38b2e107eaa92c467e1ae2 b/23/29ea1faa1ac7962f38b2e107eaa92c467e1ae2 new file mode 100644 index 000000000..0a4ebb595 --- /dev/null +++ b/23/29ea1faa1ac7962f38b2e107eaa92c467e1ae2 @@ -0,0 +1,99 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 0E3C6431FBC + for ; Sat, 29 Sep 2012 09:12:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id lXBmeirYKkFZ for ; + Sat, 29 Sep 2012 09:12:23 -0700 (PDT) +Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU + [18.7.68.36]) + by olra.theworths.org (Postfix) with ESMTP id 8FCF7431FAE + for ; Sat, 29 Sep 2012 09:12:23 -0700 (PDT) +X-AuditID: 12074424-b7fce6d000000925-3f-50671de554e7 +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP + id 4D.52.02341.5ED17605; Sat, 29 Sep 2012 12:12:21 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q8TGCK0r011052; + Sat, 29 Sep 2012 12:12:21 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q8TGCIJo026175 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sat, 29 Sep 2012 12:12:19 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1THzeM-0005wJ-AP; Sat, 29 Sep 2012 12:12:18 -0400 +Date: Sat, 29 Sep 2012 12:12:18 -0400 +From: Austin Clements +To: Damien Cassou +Subject: Re: Searching from a folder +Message-ID: <20120929161158.GX26662@mit.edu> +References: + +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: + +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IR4hRV1n0qmx5gsH+mnMWuu1uZLK7fnMns + wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGXseraHvWA1W8XUXUcYGxh7WLsYOTkkBEwk + +r8chrLFJC7cW8/WxcjFISSwj1Hi46WNTBDOBkaJJfsbWSGck0wSvccms0A4SxglZtybCNbP + IqAqsenPXjCbTUBDYtv+5YwgtoiAtsSbpR1gcWYBaYlvv5uZQGxhARWJLW8OgcV5BXQknq5+ + wgZiCwkESKzffgMqLihxcuYTFoheLYkb/14C9XKAzVn+jwMkzCkQKLH21wKwVlGgkVNObmOb + wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI118vNLNFLTSndxAgKbHYX + lR2MzYeUDjEKcDAq8fDeOJ0aIMSaWFZcmXuIUZKDSUmUl0cmPUCILyk/pTIjsTgjvqg0J7X4 + EKMEB7OSCG9GMVA5b0piZVVqUT5MSpqDRUmc93rKTX8hgfTEktTs1NSC1CKYrAwHh5IErxww + goUEi1LTUyvSMnNKENJMHJwgw3mAhh8FWcxbXJCYW5yZDpE/xagoJc77FSQhAJLIKM2D64Ul + nleM4kCvCPN+AKniASYtuO5XQIOZgAZXrUoDGVySiJCSamBM2ccvP9NzllCI8Ey+9Gpr5Xdb + hHY/Tny9amY798ZSqWezT9VefZ2lvX/hBF+W4luiP3U39yz9NSmq3rDI7qgqg21jdt2a3yzz + 1G03r+zu+Myax/PtrE1tqrqeqJSoduFUvscCk3OrLnu/PcelkyQYLTfleNRf77jiqdFT+i7I + JG9KMfyZpqLEUpyRaKjFXFScCABSu6DFFwMAAA== +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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, 29 Sep 2012 16:12:24 -0000 + +Quoth Damien Cassou on Sep 29 at 10:57 am: +> Hi, +> +> I can't make notmuch search return the list of mails in [Gmail] +> folders for a particular mailbox: +> +> ~ $ notmuch search folder:"[Gmail].All Mail" +> ~ $ notmuch search folder:[Gmail].Important + +You need to properly escape these, both for the shell and for Xapian. +Try, + +$ notmuch search 'folder:"[Gmail].All Mail"' +$ notmuch search 'folder:"[Gmail].Important"' + +The single quotes are necessary to get the inner quoting through to +Xapian (lest the shell strip them away before notmuch even gets a hold +of its arguments) and the double quotes are necessary because folder +is a "probabilistic prefix", and one of many consequences of that is +that "folder:" won't be parsed as a prefix if it's followed by an +unusual character like '['.