]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-show.1
8be9eaec00b5a58cfcbd141355f5953d92836e0e
[notmuch] / man / man1 / notmuch-show.1
1 .TH NOTMUCH-SHOW 1 2013-02-17 "Notmuch 0.15.2"
2 .SH NAME
3 notmuch-show \- show messages matching the given search terms
4 .SH SYNOPSIS
5
6 .B notmuch show
7 .RI "[" options "...] <" search-term ">..."
8
9 .SH DESCRIPTION
10
11 Shows all messages matching the search terms.
12
13 See \fBnotmuch-search-terms\fR(7)
14 for details of the supported syntax for <search-terms>.
15
16 The messages will be grouped and sorted based on the threading (all
17 replies to a particular message will appear immediately after that
18 message in date order). The output is not indented by default, but
19 depth tags are printed so that proper indentation can be performed by
20 a post-processor (such as the emacs interface to notmuch).
21
22 Supported options for
23 .B show
24 include
25 .RS 4
26 .TP 4
27 .B \-\-entire\-thread=(true|false)
28
29 If true,
30 .B notmuch show
31 outputs all messages in the thread of any message matching the search
32 terms; if false, it outputs only the matching messages. For
33 .B --format=json
34 and
35 .B --format=sexp
36 this defaults to true.  For other formats, this defaults to false.
37 .RE
38
39 .RS 4
40 .TP 4
41 .B \-\-format=(text|json|sexp|mbox|raw)
42
43 .RS 4
44 .TP 4
45 .BR text " (default for messages)"
46
47 The default plain-text format has all text-content MIME parts
48 decoded. Various components in the output,
49 .RB ( message ", " header ", " body ", " attachment ", and MIME " part ),
50 will be delimited by easily-parsed markers. Each marker consists of a
51 Control-L character (ASCII decimal 12), the name of the marker, and
52 then either an opening or closing brace, ('{' or '}'), to either open
53 or close the component. For a multipart MIME message, these parts will
54 be nested.
55 .RE
56 .RS 4
57 .TP 4
58 .B json
59
60 The output is formatted with Javascript Object Notation (JSON). This
61 format is more robust than the text format for automated
62 processing. The nested structure of multipart MIME messages is
63 reflected in nested JSON output. By default JSON output includes all
64 messages in a matching thread; that is, by default,
65
66 .B \-\-format=json
67 sets
68 .B "\-\-entire\-thread"
69 The caller can disable this behaviour by setting
70 .B \-\-entire\-thread=false
71 .RE
72 .RS 4
73 .TP 4
74 .B sexp
75
76 The output is formatted as an S-Expression (sexp). This
77 format is more robust than the text format for automated
78 processing. The nested structure of multipart MIME messages is
79 reflected in nested S-Expression output. By default,
80 S-Expression output includes all messages in a matching thread;
81 that is, by default,
82
83 .B \-\-format=sexp
84 sets
85 .B "\-\-entire\-thread"
86 The caller can disable this behaviour by setting
87 .B \-\-entire\-thread=false
88
89 .RE
90 .RS 4
91 .TP 4
92 .B mbox
93
94 All matching messages are output in the traditional, Unix mbox format
95 with each message being prefixed by a line beginning with "From " and
96 a blank line separating each message. Lines in the message content
97 beginning with "From " (preceded by zero or more '>' characters) have
98 an additional '>' character added. This reversible escaping
99 is termed "mboxrd" format and described in detail here:
100
101 .nf
102 .nh
103 http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
104 .hy
105 .fi
106 .
107 .RE
108 .RS 4
109 .TP 4
110 .BR raw " (default for a single part, see \-\-part)"
111
112 For a message or an attached message part, the original, raw content
113 of the email message is output. Consumers of this format should expect
114 to implement MIME decoding and similar functions.
115
116 For a single part (\-\-part) the raw part content is output after
117 performing any necessary MIME decoding.  Note that messages with a
118 simple body still have two parts: part 0 is the whole message and part
119 1 is the body.
120
121 For a multipart part, the part headers and body (including all child
122 parts) is output.
123
124 The raw format must only be used with search terms matching single
125 message.
126 .RE
127 .RE
128
129 .RS 4
130 .TP 4
131 .BR \-\-format-version=N
132
133 Use the specified structured output format version.  This is intended
134 for programs that invoke \fBnotmuch\fR(1) internally.  If omitted, the
135 latest supported version will be used.
136 .RE
137
138 .RS 4
139 .TP 4
140 .B \-\-part=N
141
142 Output the single decoded MIME part N of a single message.  The search
143 terms must match only a single message.  Message parts are numbered in
144 a depth-first walk of the message MIME structure, and are identified
145 in the 'json', 'sexp' or 'text' output formats.
146 .RE
147
148 .RS 4
149 .TP 4
150 .B \-\-verify
151
152 Compute and report the validity of any MIME cryptographic signatures
153 found in the selected content (ie. "multipart/signed" parts). Status
154 of the signature will be reported (currently only supported with
155 --format=json and --format=sexp), and the multipart/signed part
156 will be replaced by the signed data.
157 .RE
158
159 .RS 4
160 .TP 4
161 .B \-\-decrypt
162
163 Decrypt any MIME encrypted parts found in the selected content
164 (ie. "multipart/encrypted" parts). Status of the decryption will be
165 reported (currently only supported with --format=json and
166 --format=sexp) and the multipart/encrypted part will be replaced
167 by the decrypted content.  Implies --verify.
168 .RE
169
170 .RS 4
171 .TP 4
172 .BR \-\-exclude=(true|false)
173
174 Specify whether to omit threads only matching search.tag_exclude from
175 the search results (the default) or not. In either case the excluded
176 message will be marked with the exclude flag (except when output=mbox
177 when there is nowhere to put the flag).
178
179 If --entire-thread is specified then complete threads are returned
180 regardless (with the excluded flag being set when appropriate) but
181 threads that only match in an excluded message are not returned when
182 .B --exclude=true.
183
184 The default is
185 .B --exclude=true.
186
187 .RE
188
189 .RS 4
190 .TP 4
191 .B \-\-body=(true|false)
192
193 If true (the default)
194 .B notmuch show
195 includes the bodies of the messages in the output; if false,
196 bodies are omitted.
197 .B --body=false
198 is only implemented for the json and sexp formats and it is incompatible with
199 .B --part > 0.
200
201 This is useful if the caller only needs the headers as body-less
202 output is much faster and substantially smaller.
203 .RE
204
205 A common use of
206 .B notmuch show
207 is to display a single thread of email messages. For this, use a
208 search term of "thread:<thread-id>" as can be seen in the first
209 column of output from the
210 .B notmuch search
211 command.
212
213 .SH EXIT STATUS
214
215 This command supports the following special exit status codes
216
217 .TP
218 .B 20
219 The requested format version is too old.
220 .TP
221 .B 21
222 The requested format version is too new.
223
224 .SH SEE ALSO
225
226 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
227 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),
228 \fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
229 \fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),
230 \fBnotmuch-tag\fR(1)