Re: Searching from a folder

Subject: Re: Searching from a folder

Date: Sat, 29 Sep 2012 12:12:18 -0400

To: Damien Cassou

Cc: notmuch@notmuchmail.org

From: Austin Clements


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 '['.

Thread: