1 .. _notmuch-sexp-queries(7):
10 **notmuch** **search** ``--query=sexp`` '(and (to santa) (date december))'
19 An *s-expression* is either an atom, or list of whitespace delimited
20 s-expressions inside parentheses. Atoms are either
23 A basic value is an unquoted string containing no whitespace, double quotes, or
27 Double quotes (") delimit strings possibly containing whitespace
28 or parentheses. These can contain double quote characters by
29 escaping with backslash. E.g. ``"this is a quote \""``.
34 An s-expression query is either an atom, the empty list, or a
35 *compound query* consisting of a prefix atom (first element) defining
36 a *field*, *logical operation*, or *modifier*, and 0 or more
41 The empty list matches all messages
44 Match all messages containing *term*, possibly after
45 stemming or phase splitting. For discussion of stemming in
46 notmuch see :any:`notmuch-search-terms(7)`. Stemming only applies
47 to unquoted terms (basic values) in s-expression queries.
49 ``(`` *field* |q1| |q2| ... |qn| ``)``
50 Restrict the queries |q1| to |qn| to *field*, and combine with *and*
51 (for most fields) or *or*. See :any:`fields` for more information.
53 ``(`` *operator* |q1| |q2| ... |qn| ``)``
54 Combine queries |q1| to |qn|. See :any:`operators` for more information.
56 ``(`` *modifier* |q1| |q2| ... |qn| ``)``
57 Combine queries |q1| to |qn|, and reinterpret the result (e.g. as a regular expression).
58 See :any:`modifiers` for more information.
79 Match all messages containing the word "wizard", ignoring case.
82 Match all messages containing "added", but also those containing "add", "additional",
83 "Additional", "adds", etc... via stemming.
85 .. |q1| replace:: :math:`q_1`
86 .. |q2| replace:: :math:`q_2`
87 .. |qn| replace:: :math:`q_n`