-.TH NOTMUCH-SEARCH 1 2011-12-04 "Notmuch 0.10.2"
+.TH NOTMUCH-SEARCH 1 2012-08-20 "Notmuch 0.14"
.SH NAME
-notmuch-search \- Search for messages matching the given search terms.
+notmuch-search \- search for messages matching the given search terms
.SH SYNOPSIS
.B notmuch search
messages in the thread, the names of all participants in the thread,
and the subject of the newest (or oldest) message.
+See \fBnotmuch-search-terms\fR(7)
+for details of the supported syntax for <search-terms>.
+
Supported options for
.B search
include
.RS 4
.TP 4
-.BR \-\-format= ( json | text )
+.BR \-\-format= ( json | sexp | text )
-Presents the results in either JSON or plain-text (default).
+Presents the results in either JSON, S-Expressions or plain-text (default).
+.RE
+
+.RS 4
+.TP 4
+.BR \-\-format-version=N
+
+Use the specified structured output format version. This is intended
+for programs that invoke \fBnotmuch\fR(1) internally. If omitted, the
+latest supported version will be used.
.RE
.RS 4
Output the thread IDs of all threads with any message matching the
search terms, either one per line (\-\-format=text) or as a JSON array
-(\-\-format=json).
+(\-\-format=json) or an S-Expression list (\-\-format=sexp).
.RE
.RS 4
.TP 4
Output the message IDs of all messages matching the search terms,
either one per line (\-\-format=text) or as a JSON array
-(\-\-format=json).
+(\-\-format=json) or as an S-Expression list (\-\-format=sexp).
.RE
.RS 4
.TP 4
.B files
Output the filenames of all messages matching the search terms, either
-one per line (\-\-format=text) or as a JSON array (\-\-format=json).
+one per line (\-\-format=text) or as a JSON array (\-\-format=json) or
+as an S-Expression list (\-\-format=sexp).
.RE
.RS 4
.TP 4
.B tags
Output all tags that appear on any message matching the search terms,
-either one per line (\-\-format=text) or as a JSON array
-(\-\-format=json).
+either one per line (\-\-format=text) or as a JSON array (\-\-format=json)
+or as an S-Expression list (\-\-format=sexp).
.RE
.RE
.RE
.RS 4
-See the
-.B "SEARCH SYNTAX"
-section below for details of the supported syntax for <search-terms>.
+.TP 4
+.BR \-\-exclude=(true|false|flag)
+
+Specify whether to omit messages matching search.tag_exclude from the
+search results (the default) or not. The extra option
+.B flag
+only has an effect when
+.B --output=summary
+In this case all matching threads are returned but the "match count"
+is the number of matching non-excluded messages in the thread.
.RE
+
+.SH EXIT STATUS
+
+This command supports the following special exit status codes
+
+.TP
+.B 20
+The requested format version is too old.
+.TP
+.B 21
+The requested format version is too new.
+
+.SH SEE ALSO
+
+\fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
+\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),
+\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
+\fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
+\fBnotmuch-tag\fR(1)