8 **notmuch** **show** [*option* ...] <*search-term*> ...
13 Shows all messages matching the search terms.
15 See **notmuch-search-terms(7)** for details of the supported syntax for
18 The messages will be grouped and sorted based on the threading (all
19 replies to a particular message will appear immediately after that
20 message in date order). The output is not indented by default, but depth
21 tags are printed so that proper indentation can be performed by a
22 post-processor (such as the emacs interface to notmuch).
24 Supported options for **show** include
26 ``--entire-thread=(true|false)``
27 If true, **notmuch show** outputs all messages in the thread of
28 any message matching the search terms; if false, it outputs only
29 the matching messages. For ``--format=json`` and
30 ``--format=sexp`` this defaults to true. For other formats, this
33 ``--format=(text|json|sexp|mbox|raw)``
35 **text** (default for messages)
36 The default plain-text format has all text-content MIME
37 parts decoded. Various components in the output,
38 (**message**, **header**, **body**, **attachment**, and MIME
39 **part**), will be delimited by easily-parsed markers. Each
40 marker consists of a Control-L character (ASCII decimal 12),
41 the name of the marker, and then either an opening or
42 closing brace, ('{' or '}'), to either open or close the
43 component. For a multipart MIME message, these parts will be
47 The output is formatted with Javascript Object Notation
48 (JSON). This format is more robust than the text format for
49 automated processing. The nested structure of multipart MIME
50 messages is reflected in nested JSON output. By default JSON
51 output includes all messages in a matching thread; that is,
54 ``--format=json`` sets ``--entire-thread`` The caller can
55 disable this behaviour by setting ``--entire-thread=false``
58 The output is formatted as an S-Expression (sexp). This
59 format is more robust than the text format for automated
60 processing. The nested structure of multipart MIME messages
61 is reflected in nested S-Expression output. By default,
62 S-Expression output includes all messages in a matching
63 thread; that is, by default,
65 ``--format=sexp`` sets ``--entire-thread`` The caller can
66 disable this behaviour by setting ``--entire-thread=false``
69 All matching messages are output in the traditional, Unix
70 mbox format with each message being prefixed by a line
71 beginning with "From " and a blank line separating each
72 message. Lines in the message content beginning with "From "
73 (preceded by zero or more '>' characters) have an additional
74 '>' character added. This reversible escaping is termed
75 "mboxrd" format and described in detail here:
77 http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
79 **raw** (default for a single part, see --part)
80 For a message or an attached message part, the original, raw
81 content of the email message is output. Consumers of this
82 format should expect to implement MIME decoding and similar
85 For a single part (--part) the raw part content is output
86 after performing any necessary MIME decoding. Note that
87 messages with a simple body still have two parts: part 0 is
88 the whole message and part 1 is the body.
90 For a multipart part, the part headers and body (including
91 all child parts) is output.
93 The raw format must only be used with search terms matching
96 ``--format-version=N``
97 Use the specified structured output format version. This is
98 intended for programs that invoke **notmuch(1)** internally. If
99 omitted, the latest supported version will be used.
102 Output the single decoded MIME part N of a single message. The
103 search terms must match only a single message. Message parts are
104 numbered in a depth-first walk of the message MIME structure,
105 and are identified in the 'json', 'sexp' or 'text' output
109 Compute and report the validity of any MIME cryptographic
110 signatures found in the selected content (ie. "multipart/signed"
111 parts). Status of the signature will be reported (currently only
112 supported with --format=json and --format=sexp), and the
113 multipart/signed part will be replaced by the signed data.
116 Decrypt any MIME encrypted parts found in the selected content
117 (ie. "multipart/encrypted" parts). Status of the decryption will
118 be reported (currently only supported with --format=json and
119 --format=sexp) and on successful decryption the
120 multipart/encrypted part will be replaced by the decrypted
123 Decryption expects a functioning **gpg-agent(1)** to provide any
124 needed credentials. Without one, the decryption will fail.
128 ``--exclude=(true|false)``
129 Specify whether to omit threads only matching
130 search.tag\_exclude from the search results (the default) or
131 not. In either case the excluded message will be marked with the
132 exclude flag (except when output=mbox when there is nowhere to
135 If --entire-thread is specified then complete threads are
136 returned regardless (with the excluded flag being set when
137 appropriate) but threads that only match in an excluded message
138 are not returned when ``--exclude=true.``
140 The default is ``--exclude=true.``
142 ``--body=(true|false)``
143 If true (the default) **notmuch show** includes the bodies of
144 the messages in the output; if false, bodies are omitted.
145 ``--body=false`` is only implemented for the json and sexp
146 formats and it is incompatible with ``--part > 0.``
148 This is useful if the caller only needs the headers as body-less
149 output is much faster and substantially smaller.
152 Include "text/html" parts as part of the output (currently only
153 supported with --format=json and --format=sexp). By default,
154 unless ``--part=N`` is used to select a specific part or
155 ``--include-html`` is used to include all "text/html" parts, no
156 part with content type "text/html" is included in the output.
158 A common use of **notmuch show** is to display a single thread of email
159 messages. For this, use a search term of "thread:<thread-id>" as can be
160 seen in the first column of output from the **notmuch search** command.
165 This command supports the following special exit status codes
168 The requested format version is too old.
171 The requested format version is too new.
176 **notmuch(1)**, **notmuch-config(1)**, **notmuch-count(1)**,
177 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
178 **notmuch-new(1)**, **notmuch-reply(1)**, **notmuch-restore(1)**,
179 **notmuch-search(1)**, **notmuch-search-terms(7)**, **notmuch-tag(1)**