[PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila wrote: > On Tue, Feb 04 2014, Austin Clements wrote: > > > In zsh: > > $ echo whatever:/** > whatever:/** Except (retested after seeing related IRC msg from Austin): $ unsetopt no_nomatch $ echo whatever:/** zsh: no matches found: whatever:/** We can maybe doc

[PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Austin Clements wrote: > Quoth Jani Nikula on Feb 01 at 4:54 pm: > >> I kind of like the "/**" suffix for recursive, but there's two small >> wrinkles: 1) it needs quoting on the command line (unlike my original >> suggestion of just "/" suffix), and 2) what should the top l

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila wrote: > On Tue, Feb 04 2014, Austin Clements wrote: > > > In zsh: > > $ echo whatever:/** > whatever:/** Except (retested after seeing related IRC msg from Austin): $ unsetopt no_nomatch $ echo whatever:/** zsh: no matches found: whatever:/** We can maybe doc

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Austin Clements wrote: > Quoth Jani Nikula on Feb 01 at 4:54 pm: > >> I kind of like the "/**" suffix for recursive, but there's two small >> wrinkles: 1) it needs quoting on the command line (unlike my original >> suggestion of just "/" suffix), and 2) what should the top l

[PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Austin Clements
Quoth Rob Browning on Jan 31 at 1:19 pm: > Austin Clements writes: > > > folder: could work the way I suggested (simply the path to the file, > > with {cur,new} stripped off). > > Hmm, so would notmuch try to guess whether or not it's dealing with a > maildir++ tree, and if so convert folder:fo

[PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Austin Clements
Quoth Jani Nikula on Feb 01 at 4:54 pm: > On Fri, 31 Jan 2014, Austin Clements wrote: > > What if we introduce two prefixes, say folder: and path: (maybe dir:?) > > to address both use cases, each as naturally as possible? Both would > > be boolean prefixes because of the limitations of probabil

[PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Rob Browning
Austin Clements writes: > The simple algorithm of taking the relative path and stripping > {new,cur} (if present) does a good job of supporting both Maildir and > non-Maildir stores (while balancing this support with simplicity, > predictability, and usability). Unless, of course, the user has l

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Carl Worth
Austin Clements writes: > Agreed. I believe this will also support MH, if I understand MH > correctly (does anyone actually use MH?) When I started notmuch, I had all of my mail in one-message-per-file in various directories, (without these silly "cur" and "new" directories that maildir uses).

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Rob Browning
Austin Clements writes: > The simple algorithm of taking the relative path and stripping > {new,cur} (if present) does a good job of supporting both Maildir and > non-Maildir stores (while balancing this support with simplicity, > predictability, and usability). Unless, of course, the user has l

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Austin Clements
Quoth Rob Browning on Jan 31 at 1:19 pm: > Austin Clements writes: > > > folder: could work the way I suggested (simply the path to the file, > > with {cur,new} stripped off). > > Hmm, so would notmuch try to guess whether or not it's dealing with a > maildir++ tree, and if so convert folder:fo

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-04 Thread Austin Clements
Quoth Jani Nikula on Feb 01 at 4:54 pm: > On Fri, 31 Jan 2014, Austin Clements wrote: > > What if we introduce two prefixes, say folder: and path: (maybe dir:?) > > to address both use cases, each as naturally as possible? Both would > > be boolean prefixes because of the limitations of probabil

[PATCH 0/5] lib: make folder: prefix literal

2014-02-01 Thread Jani Nikula
On Fri, 31 Jan 2014, Austin Clements wrote: > What if we introduce two prefixes, say folder: and path: (maybe dir:?) > to address both use cases, each as naturally as possible? Both would > be boolean prefixes because of the limitations of probabilistic > prefixes, but we could take advantage of

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-01 Thread Jani Nikula
On Fri, 31 Jan 2014, Austin Clements wrote: > What if we introduce two prefixes, say folder: and path: (maybe dir:?) > to address both use cases, each as naturally as possible? Both would > be boolean prefixes because of the limitations of probabilistic > prefixes, but we could take advantage of

[PATCH 0/5] lib: make folder: prefix literal

2014-01-31 Thread Rob Browning
Austin Clements writes: > However, it seems like this is overloading one prefix for two > meanings. Oh, and I agree here. I think that ideally, there would be at least one very-literal way to identify a specific directory (or tree, perhaps via **), and then some other less-precise, but more fri

[PATCH 0/5] lib: make folder: prefix literal

2014-01-31 Thread Rob Browning
Austin Clements writes: > folder: could work the way I suggested (simply the path to the file, > with {cur,new} stripped off). Hmm, so would notmuch try to guess whether or not it's dealing with a maildir++ tree, and if so convert folder:foo to a search of .foo, and/or folder:foo/bar to .foo.bar

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-31 Thread Rob Browning
Austin Clements writes: > However, it seems like this is overloading one prefix for two > meanings. Oh, and I agree here. I think that ideally, there would be at least one very-literal way to identify a specific directory (or tree, perhaps via **), and then some other less-precise, but more fri

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-31 Thread Rob Browning
Austin Clements writes: > folder: could work the way I suggested (simply the path to the file, > with {cur,new} stripped off). Hmm, so would notmuch try to guess whether or not it's dealing with a maildir++ tree, and if so convert folder:foo to a search of .foo, and/or folder:foo/bar to .foo.bar

[PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Mark Walters
Dear Jani > That is the unicorn... many of the query improvements I have in mind > depend on a custom query parser. So I'd like to have that. And a > pony. But in the mean time, I'm left wondering whether I should pursue > folder: as a boolean prefix, or try to figure out if there are > improveme

[PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Austin Clements
Quoth Jani Nikula on Jan 25 at 5:38 pm: > On Sat, 25 Jan 2014, Jani Nikula 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 pro

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Austin Clements
Quoth Jani Nikula on Jan 25 at 5:38 pm: > On Sat, 25 Jan 2014, Jani Nikula 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 pro

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Mark Walters
Dear Jani > That is the unicorn... many of the query improvements I have in mind > depend on a custom query parser. So I'd like to have that. And a > pony. But in the mean time, I'm left wondering whether I should pursue > folder: as a boolean prefix, or try to figure out if there are > improveme

[PATCH 0/5] lib: make folder: prefix literal

2014-01-30 Thread Jani Nikula
On Wed, 29 Jan 2014, Carl Worth wrote: > Austin Clements writes: >> I think you're assuming we have much more control over this than we >> do. > > To be fair, I only started discussing my proposal for '^' and '$' in > response to Jani's proposal with special semantics for trailing '/' and > "/.".

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Jani Nikula
On Wed, 29 Jan 2014, Carl Worth wrote: > Austin Clements writes: >> I think you're assuming we have much more control over this than we >> do. > > To be fair, I only started discussing my proposal for '^' and '$' in > response to Jani's proposal with special semantics for trailing '/' and > "/.".

[PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Jani Nikula
On Sun, 26 Jan 2014, Carl Worth wrote: > Jani Nikula writes: >> Here's a thought. With boolean prefix folder:, we can devise a scheme >> where the folder: query defines what is to be matched. > > I like the idea, but I tried to infer the rules from the examples, and I > failed. It looks like ther

[PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Austin Clements
Quoth Carl Worth on Jan 29 at 11:32 am: > Jani Nikula writes: > > Unfortunately, I haven't had the time to experiment with this. But it > > bugs me that the probabilistic folder: prefix has stemming and it's case > > insensitive. It's possible to work around the stemming with the anchors > > you s

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Carl Worth
Austin Clements writes: > I think you're assuming we have much more control over this than we > do. To be fair, I only started discussing my proposal for '^' and '$' in response to Jani's proposal with special semantics for trailing '/' and "/.". Support for any of this magic syntax would requir

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Austin Clements
Quoth Carl Worth on Jan 29 at 11:32 am: > Jani Nikula writes: > > Unfortunately, I haven't had the time to experiment with this. But it > > bugs me that the probabilistic folder: prefix has stemming and it's case > > insensitive. It's possible to work around the stemming with the anchors > > you s

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Carl Worth
Jani Nikula writes: > Unfortunately, I haven't had the time to experiment with this. But it > bugs me that the probabilistic folder: prefix has stemming and it's case > insensitive. It's possible to work around the stemming with the anchors > you suggest or by quoting, but is there a way to have c

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-29 Thread Jani Nikula
On Sun, 26 Jan 2014, Carl Worth wrote: > Jani Nikula writes: >> Here's a thought. With boolean prefix folder:, we can devise a scheme >> where the folder: query defines what is to be matched. > > I like the idea, but I tried to infer the rules from the examples, and I > failed. It looks like ther

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, David Bremner wrote: > Jani Nikula writes: > >> On Sat, 25 Jan 2014, Jani Nikula 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

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, Jani Nikula 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

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Carl Worth
Jani Nikula writes: > Here's a thought. With boolean prefix folder:, we can devise a scheme > where the folder: query defines what is to be matched. I like the idea, but I tried to infer the rules from the examples, and I failed. It looks like there are two new symbols, "/" and "/." but I couldn'

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Tomi Ollila
On Sat, Jan 25 2014, Jani Nikula wrote: > On Sat, 25 Jan 2014, Tomi Ollila wrote: >> On Sat, Jan 25 2014, Jani Nikula 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

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, Tomi Ollila wrote: > On Sat, Jan 25 2014, Jani Nikula 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 propos

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread David Bremner
Jani Nikula writes: > On Sat, 25 Jan 2014, Jani Nikula 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 >> implementatio

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Tomi Ollila
On Sat, Jan 25 2014, Jani Nikula wrote: > On Fri, 24 Jan 2014, Austin Clements wrote: >> On Thu, 09 Jan 2014, Jani Nikula wrote: >>> Hi all, this series makes the folder: search prefix literal, or switches >>> it from a probabilistic prefix to a boolean prefix. With this, you have >>> to give t

[PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Fri, 24 Jan 2014, Austin Clements wrote: > On Thu, 09 Jan 2014, Jani Nikula wrote: >> Hi all, this series makes the folder: search prefix literal, or switches >> it from a probabilistic prefix to a boolean prefix. With this, you have >> to give the path from the maildir root to the folder you

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, David Bremner wrote: > Jani Nikula writes: > >> On Sat, 25 Jan 2014, Jani Nikula 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

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread David Bremner
Jani Nikula writes: > On Sat, 25 Jan 2014, Jani Nikula 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 >> implementatio

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, Jani Nikula 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

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Tomi Ollila
On Sat, Jan 25 2014, Jani Nikula wrote: > On Sat, 25 Jan 2014, Tomi Ollila wrote: >> On Sat, Jan 25 2014, Jani Nikula 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

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Sat, 25 Jan 2014, Tomi Ollila wrote: > On Sat, Jan 25 2014, Jani Nikula 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 propos

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Tomi Ollila
On Sat, Jan 25 2014, Jani Nikula wrote: > On Fri, 24 Jan 2014, Austin Clements wrote: >> On Thu, 09 Jan 2014, Jani Nikula wrote: >>> Hi all, this series makes the folder: search prefix literal, or switches >>> it from a probabilistic prefix to a boolean prefix. With this, you have >>> to give t

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-25 Thread Jani Nikula
On Fri, 24 Jan 2014, Austin Clements wrote: > On Thu, 09 Jan 2014, Jani Nikula wrote: >> Hi all, this series makes the folder: search prefix literal, or switches >> it from a probabilistic prefix to a boolean prefix. With this, you have >> to give the path from the maildir root to the folder you

[PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread David Bremner
Austin Clements writes: > On Thu, 09 Jan 2014, Jani Nikula wrote: > > I strongly disagree with requiring the cur/new component. The cur/new > directory is an internal implementation detail of Maildir (and a rather > broken one at that) and no more a part of the "folder" of a piece of > mail tha

[PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula wrote: > Hi all, this series makes the folder: search prefix literal, or switches > it from a probabilistic prefix to a boolean prefix. With this, you have > to give the path from the maildir root to the folder you want in full, > including the maildir cur/new comp

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread David Bremner
Austin Clements writes: > On Thu, 09 Jan 2014, Jani Nikula wrote: > > I strongly disagree with requiring the cur/new component. The cur/new > directory is an internal implementation detail of Maildir (and a rather > broken one at that) and no more a part of the "folder" of a piece of > mail tha

Re: [PATCH 0/5] lib: make folder: prefix literal

2014-01-24 Thread Austin Clements
On Thu, 09 Jan 2014, Jani Nikula wrote: > Hi all, this series makes the folder: search prefix literal, or switches > it from a probabilistic prefix to a boolean prefix. With this, you have > to give the path from the maildir root to the folder you want in full, > including the maildir cur/new comp

[PATCH 0/5] lib: make folder: prefix literal

2014-01-10 Thread Jani Nikula
Hi all, this series makes the folder: search prefix literal, or switches it from a probabilistic prefix to a boolean prefix. With this, you have to give the path from the maildir root to the folder you want in full, including the maildir cur/new component, if any. Examples: folder:cur folder:foo/b

[PATCH 0/5] lib: make folder: prefix literal

2014-01-09 Thread Jani Nikula
Hi all, this series makes the folder: search prefix literal, or switches it from a probabilistic prefix to a boolean prefix. With this, you have to give the path from the maildir root to the folder you want in full, including the maildir cur/new component, if any. Examples: folder:cur folder:foo/b