[PATCH v6 0/9] notmuch search date:since..until query support

Jani Nikula jani at nikula.org
Fri Nov 2 11:53:15 PDT 2012


On Fri, 02 Nov 2012, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> Just pulled current HEAD and tried
>
> $ notmuch search tag:notmuch and date:"this week"

> notmuch search tag:notmuch and date:'"this week"'

> $ notmuch search tag:notmuch and date:"this week.."

There are two technical limitations at play here, imposed on us by
Xapian. First, Xapian provides us with no way to support the date:
prefix *without* the range operator "..", and worse, AFAICT there's no
way to flag this as an error either. Second, Xapian does not support
spaces in range expression (at least not the last time I checked from
the source) regardless of the amount of quoting or escaping.

These limitations are documented in the DATE AND TIME SEARCH section of
the notmuch-search-terms(7) man page, and that's unfortunately about as
much as we can do about it at the moment.

The workaround is to always have .. in the date: search, and replace
spaces with e.g. '-' or '_'. See the man page for details. The search
you are looking for is either date:this-week..this-week or just
date:this-week..

HTH,
Jani.


More information about the notmuch mailing list