]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-show.1
version: propagate version changes
[notmuch] / man / man1 / notmuch-show.1
1 .TH NOTMUCH-SHOW 1 2012-08-20 "Notmuch 0.14"
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 this defaults to true.  For other formats, this defaults to false.
35 .RE
36
37 .RS 4
38 .TP 4
39 .B \-\-format=(text|json|mbox|raw)
40
41 .RS 4
42 .TP 4
43 .BR text " (default for messages)"
44
45 The default plain-text format has all text-content MIME parts
46 decoded. Various components in the output,
47 .RB ( message ", " header ", " body ", " attachment ", and MIME " part ),
48 will be delimited by easily-parsed markers. Each marker consists of a
49 Control-L character (ASCII decimal 12), the name of the marker, and
50 then either an opening or closing brace, ('{' or '}'), to either open
51 or close the component. For a multipart MIME message, these parts will
52 be nested.
53 .RE
54 .RS 4
55 .TP 4
56 .B json
57
58 The output is formatted with Javascript Object Notation (JSON). This
59 format is more robust than the text format for automated
60 processing. The nested structure of multipart MIME messages is
61 reflected in nested JSON output. By default JSON output includes all
62 messages in a matching thread; that is, by default,
63 .B \-\-format=json
64 sets
65 .B "\-\-entire\-thread"
66 The caller can disable this behaviour by setting
67 .B \-\-entire\-thread=false
68
69 .RE
70 .RS 4
71 .TP 4
72 .B mbox
73
74 All matching messages are output in the traditional, Unix mbox format
75 with each message being prefixed by a line beginning with "From " and
76 a blank line separating each message. Lines in the message content
77 beginning with "From " (preceded by zero or more '>' characters) have
78 an additional '>' character added. This reversible escaping
79 is termed "mboxrd" format and described in detail here:
80
81 .nf
82 .nh
83 http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
84 .hy
85 .fi
86 .
87 .RE
88 .RS 4
89 .TP 4
90 .BR raw " (default for a single part, see \-\-part)"
91
92 For a message or an attached message part, the original, raw content
93 of the email message is output. Consumers of this format should expect
94 to implement MIME decoding and similar functions.
95
96 For a single part (\-\-part) the raw part content is output after
97 performing any necessary MIME decoding.  Note that messages with a
98 simple body still have two parts: part 0 is the whole message and part
99 1 is the body.
100
101 For a multipart part, the part headers and body (including all child
102 parts) is output.
103
104 The raw format must only be used with search terms matching single
105 message.
106 .RE
107 .RE
108
109 .RS 4
110 .TP 4
111 .B \-\-part=N
112
113 Output the single decoded MIME part N of a single message.  The search
114 terms must match only a single message.  Message parts are numbered in
115 a depth-first walk of the message MIME structure, and are identified
116 in the 'json' or 'text' output formats.
117 .RE
118
119 .RS 4
120 .TP 4
121 .B \-\-verify
122
123 Compute and report the validity of any MIME cryptographic signatures
124 found in the selected content (ie. "multipart/signed" parts). Status
125 of the signature will be reported (currently only supported with
126 --format=json), and the multipart/signed part will be replaced by the
127 signed data.
128 .RE
129
130 .RS 4
131 .TP 4
132 .B \-\-decrypt
133
134 Decrypt any MIME encrypted parts found in the selected content
135 (ie. "multipart/encrypted" parts). Status of the decryption will be
136 reported (currently only supported with --format=json) and the
137 multipart/encrypted part will be replaced by the decrypted
138 content.  Implies --verify.
139 .RE
140
141 .RS 4
142 .TP 4
143 .BR \-\-exclude=(true|false)
144
145 Specify whether to omit threads only matching search.tag_exclude from
146 the search results (the default) or not. In either case the excluded
147 message will be marked with the exclude flag (except when output=mbox
148 when there is nowhere to put the flag).
149
150 If --entire-thread is specified then complete threads are returned
151 regardless (with the excluded flag being set when appropriate) but
152 threads that only match in an excluded message are not returned when
153 .B --exclude=true.
154
155 The default is
156 .B --exclude=true.
157
158 .RE
159
160 .RS 4
161 .TP 4
162 .B \-\-body=(true|false)
163
164 If true (the default)
165 .B notmuch show
166 includes the bodies of the messages in the output; if false,
167 bodies are omitted.
168 .B --body=false
169 is only implemented for the json format and it is incompatible with
170 .B --part > 0.
171
172 This is useful if the caller only needs the headers as body-less
173 output is much faster and substantially smaller.
174 .RE
175
176 A common use of
177 .B notmuch show
178 is to display a single thread of email messages. For this, use a
179 search term of "thread:<thread-id>" as can be seen in the first
180 column of output from the
181 .B notmuch search
182 command.
183
184 .SH SEE ALSO
185
186 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
187 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),
188 \fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
189 \fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),
190 \fBnotmuch-tag\fR(1)