1 <h1>NOTMUCH-SHOW(1)</h1>
5 notmuch-show - show messages matching the given search terms
10 <b>notmuch</b> <b>show</b> [<u>option</u> ...] <<u>search-term</u>> ...
15 Shows all messages matching the search terms.
17 See <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of the supported syntax for
20 The messages will be grouped and sorted based on the threading (all
21 replies to a particular message will appear immediately after that mes‐
22 sage in date order). The output is not indented by default, but depth
23 tags are printed so that proper indentation can be performed by a
24 post-processor (such as the emacs interface to notmuch).
26 Supported options for <b>show</b> include
28 <b>--entire-thread=(true|false)</b>
29 If true, <b>notmuch</b> <b>show</b> outputs all messages in the thread of
30 any message matching the search terms; if false, it outputs
31 only the matching messages. For <b>--format=json</b> and <b>--for-</b>
32 <b>mat=sexp</b> this defaults to true. For other formats, this
35 <b>--format=(text|json|sexp|mbox|raw)</b>
37 <b>text</b> <b>(default</b> <b>for</b> <b>messages)</b>
38 The default plain-text format has all text-content MIME
39 parts decoded. Various components in the output, (<b>mes-</b>
40 <b>sage</b>, <b>header</b>, <b>body</b>, <b>attachment</b>, and MIME <b>part</b>), will be
41 delimited by easily-parsed markers. Each marker consists
42 of a Control-L character (ASCII decimal 12), the name of
43 the marker, and then either an opening or closing brace,
44 ('{' or '}'), to either open or close the component. For
45 a multipart MIME message, these parts will be nested.
47 <b>json</b> The output is formatted with Javascript Object Notation
48 (JSON). This format is more robust than the text format
49 for automated processing. The nested structure of multi‐
50 part MIME messages is reflected in nested JSON output. By
51 default JSON output includes all messages in a matching
52 thread; that is, by default, <b>--format=json</b> sets
53 <b>--entire-thread</b>. The caller can disable this behaviour by
54 setting <b>--entire-thread=false</b>. The JSON output is always
55 encoded as UTF-8 and any message content included in the
56 output will be charset-converted to UTF-8.
58 <b>sexp</b> The output is formatted as the Lisp s-expression (sexp)
59 equivalent of the JSON format above. Objects are format‐
60 ted as property lists whose keys are keywords (symbols
61 preceded by a colon). True is formatted as <b>t</b> and both
62 false and null are formatted as <b>nil</b>. As for JSON, the
63 s-expression output is always encoded as UTF-8.
65 <b>mbox</b> All matching messages are output in the traditional, Unix
66 mbox format with each message being prefixed by a line
67 beginning with "From " and a blank line separating each
68 message. Lines in the message content beginning with
69 "From " (preceded by zero or more '>' characters) have an
70 additional '>' character added. This reversible escaping
71 is termed "mboxrd" format and described in detail here:
73 <u>http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html</u>
75 <b>raw</b> <b>(default</b> <b>if</b> <b>--part</b> <b>is</b> <b>given)</b>
76 Write the raw bytes of the given MIME part of a message
77 to standard out. For this format, it is an error to spec‐
78 ify a query that matches more than one message.
80 If the specified part is a leaf part, this outputs the
81 body of the part after performing content transfer decod‐
82 ing (but no charset conversion). This is suitable for
83 saving attachments, for example.
85 For a multipart or message part, the output includes the
86 part headers as well as the body (including all child
87 parts). No decoding is performed because multipart and
88 message parts cannot have non-trivial content transfer
89 encoding. Consumers of this may need to implement MIME
90 decoding and similar functions.
92 <b>--format-version=N</b>
93 Use the specified structured output format version. This is
94 intended for programs that invoke <a href='../notmuch-1/'>notmuch</a>(1) internally. If
95 omitted, the latest supported version will be used.
98 Output the single decoded MIME part N of a single message.
99 The search terms must match only a single message. Message
100 parts are numbered in a depth-first walk of the message MIME
101 structure, and are identified in the 'json', 'sexp' or 'text'
104 Note that even a message with no MIME structure or a single
105 body part still has two MIME parts: part 0 is the whole mes‐
106 sage (headers and body) and part 1 is just the body.
109 Compute and report the validity of any MIME cryptographic
110 signatures found in the selected content (ie. "multi‐
111 part/signed" parts). Status of the signature will be reported
112 (currently only supported with --format=json and --for‐
113 mat=sexp), and the multipart/signed part will be replaced by
117 Decrypt any MIME encrypted parts found in the selected con‐
118 tent (ie. "multipart/encrypted" parts). Status of the decryp‐
119 tion will be reported (currently only supported with --for‐
120 mat=json and --format=sexp) and on successful decryption the
121 multipart/encrypted part will be replaced by the decrypted
124 Decryption expects a functioning <b>gpg-agent</b>(1) to provide any
125 needed credentials. Without one, the decryption will fail.
129 <b>--exclude=(true|false)</b>
130 Specify whether to omit threads only matching
131 search.tag_exclude from the search results (the default) or
132 not. In either case the excluded message will be marked with
133 the exclude flag (except when output=mbox when there is
134 nowhere to put the flag).
136 If --entire-thread is specified then complete threads are
137 returned regardless (with the excluded flag being set when
138 appropriate) but threads that only match in an excluded mes‐
139 sage are not returned when <b>--exclude=true.</b>
141 The default is <b>--exclude=true.</b>
143 <b>--body=(true|false)</b>
144 If true (the default) <b>notmuch</b> <b>show</b> includes the bodies of the
145 messages in the output; if false, bodies are omitted.
146 <b>--body=false</b> is only implemented for the json and sexp for‐
147 mats and it is incompatible with <b>--part</b> <b>></b> <b>0.</b>
149 This is useful if the caller only needs the headers as
150 body-less output is much faster and substantially smaller.
152 <b>--include-html</b>
153 Include "text/html" parts as part of the output (currently
154 only supported with --format=json and --format=sexp). By
155 default, unless <b>--part=N</b> is used to select a specific part or
156 <b>--include-html</b> is used to include all "text/html" parts, no
157 part with content type "text/html" is included in the output.
159 A common use of <b>notmuch</b> <b>show</b> is to display a single thread of email
160 messages. For this, use a search term of "thread:<thread-id>" as can be
161 seen in the first column of output from the <b>notmuch</b> <b>search</b> command.
166 This command supports the following special exit status codes
168 <b>20</b> The requested format version is too old.
170 <b>21</b> The requested format version is too new.
175 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>not‐</a>
176 <a href='../notmuch-hooks-5/'>much-hooks</a>(5), <a href='../notmuch-insert-1/'>notmuch-insert</a>(1), <a href='../notmuch-new-1/'>notmuch-new</a>(1), <a href='../notmuch-reply-1/'>notmuch-reply</a>(1),
177 <a href='../notmuch-restore-1/'>notmuch-restore</a>(1), <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7), <a href='../notmuch-tag-1/'>not‐</a>
178 <a href='../notmuch-tag-1/'>much-tag</a>(1)
183 Carl Worth and many others
188 2015, Carl Worth and many others