[RFC PATCH 0/2] natural language date range search

Tomi Ollila tomi.ollila at iki.fi
Sun Feb 26 23:45:01 PST 2012


On Sat, 25 Feb 2012 21:53:27 +0200, Jani Nikula <jani at nikula.org> wrote:
> On Sat, 25 Feb 2012 17:05:44 +0200, Tomi Ollila <tomi.ollila at iki.fi> wrote:

[ ... ]

> > 
> > By seeing the thoughts thrown in IRC there seems to be plenty if things
> > to resolve until something like this is going to be available in stock
> > notmuch. In the meanwhile I provide some ideas into the soup; maybe
> > our collective mind can have some use of this.
> > 
> > 
> > Q: Could 'date:timestr' be converted to 'date:timestr..timestr' ?
> 
> AFAICT this would require the custom query parser.

So, maybe someday... :)

> > In this idea -<timestr> means relative time and <timestr> absolute
> > time. The the time string consists of number and letter and assume
> > the above suggestion for date:timestr (<- == date:timestr..timestr)
> > Letters are s seconds  h hours  d days  w weeks  m months (more
> > useful than for minutes) and  y years.
> 
> I'll put it bluntly: show me the code! ;)

I would not have expected nothing less ;)

> I'll comment below how your examples can be expressed with working code
> in this series, just for comparison, and to show what can be done with
> this.

Great! Those features suits to my needs just fine; last day is most often
needed, then parhaps I jump to one week. 5w is good for ~one month. 
More "absolute" times (like last november / since last november) are so
seldomly needed that writing a bit more is not an issue :D

[ ... ]

> 
> BR,
> Jani.

Tomi


More information about the notmuch mailing list