aboutsummaryrefslogtreecommitdiff
path: root/doc/man7
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-24 08:17:25 -0700
committerDavid Bremner <david@tethera.net>2021-09-04 17:07:19 -0700
commit0ca4ad2670b22e975a018f9f662ea3a762840583 (patch)
treeaba2f3b5cc268d378819127d5d9c0c8e76ecbd46 /doc/man7
parent011d06f4d6fec8083581676ba9f9448fe7bea1be (diff)
lib/parse-sexp: add '*' as syntactic sugar for '(starts-with "")'
Users that insist on using a literal '*' as a tag, can continue to do so by quoting it when searching.
Diffstat (limited to 'doc/man7')
-rw-r--r--doc/man7/notmuch-sexp-queries.rst19
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst
index c83ce3d0..f32bab9c 100644
--- a/doc/man7/notmuch-sexp-queries.rst
+++ b/doc/man7/notmuch-sexp-queries.rst
@@ -36,8 +36,11 @@ An s-expression query is either an atom, the empty list, or a
a *field*, *logical operation*, or *modifier*, and 0 or more
subqueries.
-``*`` ``()``
- Match all messages.
+``*``
+ "*" matches any non-empty string in the current field.
+
+``()``
+ The empty list matches all messages
*term*
@@ -138,6 +141,15 @@ from terms, operators, and modifiers, but not other fields.
MODIFIERS
`````````
+*Modifiers* refer to any prefixes (first elements of compound queries)
+that are neither operators nor fields.
+
+``(starts-with`` *subword* ``)``
+ Matches any term starting with *subword*. This applies in either
+ phrase or term :any:`fields <fields>`, or outside of fields [#not-body]_. Note that
+ a ``starts-with`` query cannot be part of a phrase. The
+ atom ``*`` is a synonym for ``(starts-with "")``.
+
EXAMPLES
========
@@ -181,6 +193,9 @@ EXAMPLES
"mallory@example.org", and also "bob@example.com.au" since it
contains the adjacent triple "bob", "example", "com".
+``(not (to *))``
+ Match messages with an empty or invalid 'To' and 'Cc' field.
+
NOTES
=====