From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: [PATCH 4/4] doc/sexp: document range queries.
Date: Sat, 4 Jun 2022 18:53:59 -0300 [thread overview]
Message-ID: <20220604215359.1311950-4-david@tethera.net> (raw)
In-Reply-To: <20220604215359.1311950-1-david@tethera.net>
Give examples for date fields, as these are commonly useful for user
queries.
---
doc/man7/notmuch-sexp-queries.rst | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst
index 1d7e0ae9..be589f98 100644
--- a/doc/man7/notmuch-sexp-queries.rst
+++ b/doc/man7/notmuch-sexp-queries.rst
@@ -119,6 +119,12 @@ a message has one such attribute, and ``and`` otherwise.
Term or phrase fields can contain arbitrarily complex queries made up
from terms, operators, and modifiers, but not other fields.
+Range fields take one or two arguments specifying lower and upper
+bounds. One argument is interpreted as identical upper and lower
+bounds. Either upper or lower bound may be specified as ``""`` or
+``*`` to specify the lowest possible lower bound or highest possible
+upper bound.
+
.. _field-table:
.. table:: Fields with supported modifiers
@@ -240,6 +246,18 @@ EXAMPLES
Match messages in the given date range with tag unread.
+``(and (date 2009-11-18 2009-11-18) (tag unread))``
+
+ Match messages in the given date range with tag unread.
+
+``(and (date 2009-11-18 *) (tag unread))``
+
+ Match messages from 2009-11-18 or later with tag unread.
+
+``(and (date * 2009-11-18) (tag unread))``
+
+ Match messages from 2009-11-18 or earlier with tag unread.
+
``(starts-with prelim)``
Match any words starting with "prelim".
--
2.35.2
next prev parent reply other threads:[~2022-06-04 21:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 14:23 [Wishlist] Add equivalent of lastmod:nnn.. to sexp query parser David Bremner
2022-06-04 21:53 ` [PATCH 1/4] test/sexp: one sided range searches David Bremner
2022-06-04 21:53 ` [PATCH 2/4] lib/sexp: special case "" as an argument in lastmod ranges David Bremner
2022-06-04 21:53 ` [PATCH 3/4] lib/sexp: allow * as alias for "" in range searches David Bremner
2022-06-04 21:53 ` David Bremner [this message]
2022-06-25 23:00 ` [PATCH 1/4] test/sexp: one sided " David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220604215359.1311950-4-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).