Searching from a folder

Austin Clements amdragon at MIT.EDU
Sat Sep 29 09:12:18 PDT 2012


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


More information about the notmuch mailing list