unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* how the date query works?
@ 2013-05-20 13:33 David Belohrad
  2013-05-20 14:11 ` David Bremner
  2013-05-20 14:19 ` Jani Nikula
  0 siblings, 2 replies; 4+ messages in thread
From: David Belohrad @ 2013-05-20 13:33 UTC (permalink / raw)
  To: notmuch

Dear all,

could someone explain how to use date query? As of Oct 2012 Jani added
set of patches doing date query.

When I open in emacs search, and I type 'date:today', some output
appears, but not the one I would expect.

Interesting enough is, that if I press 'da' and then <tab>, it offers
date search.

Is there any kind of manual how to use it? I'm of course particularly
interested in 'today', 'yesterday', 'last week', 'last month' :)

thanks

david

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how the date query works?
  2013-05-20 13:33 how the date query works? David Belohrad
@ 2013-05-20 14:11 ` David Bremner
  2013-05-20 14:19 ` Jani Nikula
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2013-05-20 14:11 UTC (permalink / raw)
  To: David Belohrad, notmuch

David Belohrad <david@belohrad.ch> writes:

>
> Is there any kind of manual how to use it? I'm of course particularly
> interested in 'today', 'yesterday', 'last week', 'last month' :)
>

See man notmuch-search-terms 

    http://notmuchmail.org/manpages/notmuch-search-terms-7/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how the date query works?
  2013-05-20 13:33 how the date query works? David Belohrad
  2013-05-20 14:11 ` David Bremner
@ 2013-05-20 14:19 ` Jani Nikula
  2013-05-21 14:29   ` David Belohrad
  1 sibling, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2013-05-20 14:19 UTC (permalink / raw)
  To: David Belohrad, notmuch

On Mon, 20 May 2013, David Belohrad <david@belohrad.ch> wrote:
> When I open in emacs search, and I type 'date:today', some output
> appears, but not the one I would expect.

The date: search expects a Xapian range expression, which requires ".."
to be present in the query. For example, date:today..today from
beginning of today to end of today, which I believe is what you're
after. Half open ranges are okay, too, so assuming you don't have much
mail from the future, simply date:today.. will do.

Unfortunately, due to a limitation in Xapian, we can't flag an error or
do the right thing given a date: search without the range expression
".."

> Is there any kind of manual how to use it? I'm of course particularly
> interested in 'today', 'yesterday', 'last week', 'last month' :)

The search terms manual page, 'man notmuch-search-terms', which is also
available at http://notmuchmail.org/manpages/notmuch-search-terms-7/
gives a pretty good summary on the date search, including the
limitations.

HTH,
Jani.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how the date query works?
  2013-05-20 14:19 ` Jani Nikula
@ 2013-05-21 14:29   ` David Belohrad
  0 siblings, 0 replies; 4+ messages in thread
From: David Belohrad @ 2013-05-21 14:29 UTC (permalink / raw)
  To: Jani Nikula, notmuch

thanks to everybody. i have completely missed that man page.

.d.



Jani Nikula <jani@nikula.org> writes:

> On Mon, 20 May 2013, David Belohrad <david@belohrad.ch> wrote:
>> When I open in emacs search, and I type 'date:today', some output
>> appears, but not the one I would expect.
>
> The date: search expects a Xapian range expression, which requires ".."
> to be present in the query. For example, date:today..today from
> beginning of today to end of today, which I believe is what you're
> after. Half open ranges are okay, too, so assuming you don't have much
> mail from the future, simply date:today.. will do.
>
> Unfortunately, due to a limitation in Xapian, we can't flag an error or
> do the right thing given a date: search without the range expression
> ".."
>
>> Is there any kind of manual how to use it? I'm of course particularly
>> interested in 'today', 'yesterday', 'last week', 'last month' :)
>
> The search terms manual page, 'man notmuch-search-terms', which is also
> available at http://notmuchmail.org/manpages/notmuch-search-terms-7/
> gives a pretty good summary on the date search, including the
> limitations.
>
> HTH,
> Jani.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-21 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 13:33 how the date query works? David Belohrad
2013-05-20 14:11 ` David Bremner
2013-05-20 14:19 ` Jani Nikula
2013-05-21 14:29   ` David Belohrad

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).