Jani Nikula <jani@nikula.org> writes: > On Sat, 25 Jan 2014, Jani Nikula <jani@nikula.org> wrote: >> Perhaps we need to have two prefixes, one of which is the literal >> filesystem folder and another which hides the implementation details, >> like I mentioned in my mail to Peter [1]. But consider this: my proposed >> implementation does cover *all* use cases. > > Here's a thought. With boolean prefix folder:, we can devise a scheme > where the folder: query defines what is to be matched. > > For example: > > folder:foo match files in foo, foo/new, and foo/cur. > folder:foo/ match all files in all subdirectories under foo (this > would handle Tomi's use case), including foo/new and > foo/cur. handling hierarchies sounds useful and natural > folder:foo/. match in foo only, and specifically not in foo/cur or foo/new. > folder:foo/new match in foo/new, and specifically not in foo/cur (this > allows distinguishing between messages in cur and new). is "new" special cased here? or do you rely on it being a leaf directory? > folder:/ match everything. > folder:/. match in top level maildir only. > folder:"" match in top level maildir, including cur/new. I could certainly support this UI, assuming the database bloat is not too bad. I started to wonder about using 3 prefixes instead, but then I read your message again and a light went on. ;). d