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 ``--format=sexp``
30 this defaults to true. For other formats, this defaults to false.
32 ``--format=(text|json|sexp|mbox|raw)``
33 **text** (default for messages)
34 The default plain-text format has all text-content MIME parts
35 decoded. Various components in the output, (**message**,
36 **header**, **body**, **attachment**, and MIME **part**), will
37 be delimited by easily-parsed markers. Each marker consists of
38 a Control-L character (ASCII decimal 12), the name of the
39 marker, and then either an opening or closing brace, ('{' or
40 '}'), to either open or close the component. For a multipart
41 MIME message, these parts will be nested.
44 The output is formatted with Javascript Object Notation
45 (JSON). This format is more robust than the text format for
46 automated processing. The nested structure of multipart MIME
47 messages is reflected in nested JSON output. By default JSON
48 output includes all messages in a matching thread; that is, by
49 default, ``--format=json`` sets ``--entire-thread``. The
50 caller can disable this behaviour by setting
51 ``--entire-thread=false``. The JSON output is always encoded
52 as UTF-8 and any message content included in the output will
53 be charset-converted to UTF-8.
56 The output is formatted as the Lisp s-expression (sexp)
57 equivalent of the JSON format above. Objects are formatted as
58 property lists whose keys are keywords (symbols preceded by a
59 colon). True is formatted as ``t`` and both false and null are
60 formatted as ``nil``. As for JSON, the s-expression output is
61 always encoded as UTF-8.
64 All matching messages are output in the traditional, Unix mbox
65 format with each message being prefixed by a line beginning
66 with "From " and a blank line separating each message. Lines
67 in the message content beginning with "From " (preceded by
68 zero or more '>' characters) have an additional '>' character
69 added. This reversible escaping is termed "mboxrd" format and
70 described in detail here:
72 http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
74 **raw** (default if --part is given)
75 Write the raw bytes of the given MIME part of a message to
76 standard out. For this format, it is an error to specify a
77 query that matches more than one message.
79 If the specified part is a leaf part, this outputs the body of
80 the part after performing content transfer decoding (but no
81 charset conversion). This is suitable for saving attachments,
84 For a multipart or message part, the output includes the part
85 headers as well as the body (including all child parts). No
86 decoding is performed because multipart and message parts
87 cannot have non-trivial content transfer encoding. Consumers
88 of this may need to implement MIME decoding and similar
91 ``--format-version=N``
92 Use the specified structured output format version. This is
93 intended for programs that invoke **notmuch(1)** internally. If
94 omitted, the latest supported version will be used.
97 Output the single decoded MIME part N of a single message. The
98 search terms must match only a single message. Message parts are
99 numbered in a depth-first walk of the message MIME structure, and
100 are identified in the 'json', 'sexp' or 'text' output formats.
102 Note that even a message with no MIME structure or a single body
103 part still has two MIME parts: part 0 is the whole message
104 (headers and body) and part 1 is just the body.
107 Compute and report the validity of any MIME cryptographic
108 signatures found in the selected content (ie. "multipart/signed"
109 parts). Status of the signature will be reported (currently only
110 supported with --format=json and --format=sexp), and the
111 multipart/signed part will be replaced by the signed data.
113 ``--decrypt=(false|auto|true)``
114 If ``true``, decrypt any MIME encrypted parts found in the
115 selected content (i.e. "multipart/encrypted" parts). Status of
116 the decryption will be reported (currently only supported
117 with --format=json and --format=sexp) and on successful
118 decryption the multipart/encrypted part will be replaced by
119 the decrypted content.
121 If ``auto``, and a session key is already known for the
122 message, then it will be decrypted, but notmuch will not try
123 to access the user's keys.
125 Use ``false`` to avoid even automatic decryption.
127 Non-automatic decryption expects a functioning
128 **gpg-agent(1)** to provide any needed credentials. Without
129 one, the decryption will fail.
131 Note: ``true`` implies --verify.
135 ``--exclude=(true|false)``
136 Specify whether to omit threads only matching search.tag\_exclude
137 from the search results (the default) or not. In either case the
138 excluded message will be marked with the exclude flag (except when
139 output=mbox when there is nowhere to put the flag).
141 If --entire-thread is specified then complete threads are returned
142 regardless (with the excluded flag being set when appropriate) but
143 threads that only match in an excluded message are not returned
144 when ``--exclude=true.``
146 The default is ``--exclude=true.``
148 ``--body=(true|false)``
149 If true (the default) **notmuch show** includes the bodies of the
150 messages in the output; if false, bodies are omitted.
151 ``--body=false`` is only implemented for the json and sexp formats
152 and it is incompatible with ``--part > 0.``
154 This is useful if the caller only needs the headers as body-less
155 output is much faster and substantially smaller.
158 Include "text/html" parts as part of the output (currently only
159 supported with --format=json and --format=sexp). By default,
160 unless ``--part=N`` is used to select a specific part or
161 ``--include-html`` is used to include all "text/html" parts, no
162 part with content type "text/html" is included in the output.
164 A common use of **notmuch show** is to display a single thread of email
165 messages. For this, use a search term of "thread:<thread-id>" as can be
166 seen in the first column of output from the **notmuch search** command.
171 This command supports the following special exit status codes
174 The requested format version is too old.
177 The requested format version is too new.
183 **notmuch-config(1)**,
184 **notmuch-count(1)**,
186 **notmuch-hooks(5)**,
187 **notmuch-insert(1)**,
189 **notmuch-reply(1)**,
190 **notmuch-restore(1)**,
191 **notmuch-search(1)**,
192 **notmuch-search-terms(7)**,