]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-show-1.mdwn
4902b5acffdd090b0c3609e4fec8c0f43980d4dc
[notmuch-wiki] / manpages / notmuch-show-1.mdwn
1 <h1>NOTMUCH-SHOW(1)</h1>
2
3 <h2>NAME</h2>
4 <pre>
5        notmuch-show - show messages matching the given search terms
6 </pre>
7
8 <h2>SYNOPSIS</h2>
9 <pre>
10        <b>notmuch</b> <b>show</b> [<u>option</u> ...] &lt;<u>search-term</u>&gt; ...
11 </pre>
12
13 <h2>DESCRIPTION</h2>
14 <pre>
15        Shows all messages matching the search terms.
16
17        See  <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7)  for  details  of the supported syntax for
18        &lt;search-terms&gt;.
19
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).
25
26        Supported options for <b>show</b> include
27
28        <b>--entire-thread=(true|false)</b>
29               If true, <b>notmuch</b> <b>show</b> outputs all messages in the thread of  any
30               message matching the search terms; if false, it outputs only the
31               matching messages.  For  <b>--format=json</b>  and  <b>--format=sexp</b>  this
32               defaults to true. For other formats, this defaults to false.
33
34        <b>--format=(text|json|sexp|mbox|raw)</b>
35
36               <b>text</b> (default for messages)
37                      The  default  plain-text format has all text-content MIME
38                      parts decoded. Various components in  the  output,  (<b>mes-</b>
39                      <b>sage</b>,  <b>header</b>,  <b>body</b>, <b>attachment</b>, and MIME <b>part</b>), will be
40                      delimited by easily-parsed markers. Each marker  consists
41                      of  a Control-L character (ASCII decimal 12), the name of
42                      the marker, and then either an opening or closing  brace,
43                      (&apos;{&apos;  or &apos;}&apos;), to either open or close the component. For
44                      a multipart MIME message, these parts will be nested.
45
46               <b>json</b>   The output is formatted with Javascript  Object  Notation
47                      (JSON).  This  format is more robust than the text format
48                      for automated processing. The nested structure of  multi‐
49                      part MIME messages is reflected in nested JSON output. By
50                      default JSON output includes all messages in  a  matching
51                      thread;   that   is,   by   default,  <b>--format=json</b>  sets
52                      <b>--entire-thread</b>. The caller can disable this behaviour by
53                      setting <b>--entire-thread=false</b>.  The JSON output is always
54                      encoded as UTF-8 and any message content included in  the
55                      output will be charset-converted to UTF-8.
56
57               <b>sexp</b>   The  output  is formatted as the Lisp s-expression (sexp)
58                      equivalent of the JSON format above. Objects are  format‐
59                      ted  as  property  lists whose keys are keywords (symbols
60                      preceded by a colon). True is formatted  as  <b>t</b>  and  both
61                      false  and  null  are  formatted as <b>nil</b>. As for JSON, the
62                      s-expression output is always encoded as UTF-8.
63
64               <b>mbox</b>   All matching messages are output in the traditional, Unix
65                      mbox  format  with  each message being prefixed by a line
66                      beginning with &quot;From &quot; and a blank line  separating  each
67                      message.  Lines  in  the  message  content beginning with
68                      &quot;From &quot; (preceded by zero or more &apos;&gt;&apos; characters) have an
69                      additional  &apos;&gt;&apos; character added. This reversible escaping
70                      is termed &quot;mboxrd&quot; format and described in detail here:
71                         <u>http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html</u>
72
73               <b>raw</b> (default if --part is given)
74                      Write  the  raw bytes of the given MIME part of a message
75                      to standard out. For this format, it is an error to spec‐
76                      ify a query that matches more than one message.
77
78                      If  the  specified  part is a leaf part, this outputs the
79                      body of the part after performing content transfer decod‐
80                      ing  (but  no  charset  conversion). This is suitable for
81                      saving attachments, for example.
82
83                      For a multipart or message part, the output includes  the
84                      part  headers  as  well  as the body (including all child
85                      parts). No decoding is performed  because  multipart  and
86                      message  parts  cannot  have non-trivial content transfer
87                      encoding. Consumers of this may need  to  implement  MIME
88                      decoding and similar functions.
89
90        <b>--format-version=N</b>
91               Use  the  specified  structured  output  format version. This is
92               intended for programs  that  invoke  <a href='../notmuch-1/'>notmuch</a>(1)  internally.  If
93               omitted, the latest supported version will be used.
94
95        <b>--part=N</b>
96               Output  the  single decoded MIME part N of a single message. The
97               search terms must match only a single message. Message parts are
98               numbered  in  a  depth-first walk of the message MIME structure,
99               and are identified in the &apos;json&apos;, &apos;sexp&apos; or &apos;text&apos;  output  for‐
100               mats.
101
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.
105
106        <b>--verify</b>
107               Compute and report the validity of any MIME cryptographic signa‐
108               tures found in  the  selected  content  (ie.  &quot;multipart/signed&quot;
109               parts). Status of the signature will be reported (currently only
110               supported with --format=json and --format=sexp), and the  multi‐
111               part/signed part will be replaced by the signed data.
112
113        <b>--decrypt=(false|auto|true)</b>
114               If  <b>true</b>, decrypt any MIME encrypted parts found in the selected
115               content  (i.e.  &quot;multipart/encrypted&quot;  parts).  Status  of   the
116               decryption  will  be  reported  (currently  only  supported with
117               --format=json and --format=sexp) and  on  successful  decryption
118               the  multipart/encrypted  part will be replaced by the decrypted
119               content.
120
121               If <b>auto</b>, and a session key is already  known  for  the  message,
122               then  it  will  be decrypted, but notmuch will not try to access
123               the user&apos;s keys.
124
125               Use <b>false</b> to avoid even automatic decryption.
126
127               Non-automatic decryption expects a functioning  <b>gpg-agent</b>(1)  to
128               provide any needed credentials. Without one, the decryption will
129               fail.
130
131               Note: <b>true</b> implies --verify.
132
133               Default: <b>auto</b>
134
135        <b>--exclude=(true|false)</b>
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
139               when output=mbox when there is nowhere to put the flag).
140
141               If  --entire-thread  is  specified  then  complete  threads  are
142               returned regardless (with  the  excluded  flag  being  set  when
143               appropriate)  but threads that only match in an excluded message
144               are not returned when <b>--exclude=true.</b>
145
146               The default is <b>--exclude=true.</b>
147
148        <b>--body=(true|false)</b>
149               If true (the default) <b>notmuch</b> <b>show</b> includes the  bodies  of  the
150               messages   in   the   output;  if  false,  bodies  are  omitted.
151               <b>--body=false</b> is only implemented for the json and  sexp  formats
152               and it is incompatible with <b>--part</b> <b>&gt;</b> <b>0.</b>
153
154               This is useful if the caller only needs the headers as body-less
155               output is much faster and substantially smaller.
156
157        <b>--include-html</b>
158               Include &quot;text/html&quot; parts as part of the output (currently  only
159               supported  with  --format=json  and  --format=sexp). By default,
160               unless  <b>--part=N</b>  is  used  to  select  a   specific   part   or
161               <b>--include-html</b> is used to include all &quot;text/html&quot; parts, no part
162               with content type &quot;text/html&quot; is included in the output.
163
164        A common use of <b>notmuch</b> <b>show</b> is to display a  single  thread  of  email
165        messages. For this, use a search term of &quot;thread:&lt;thread-id&gt;&quot; as can be
166        seen in the first column of output from the <b>notmuch</b> <b>search</b> command.
167 </pre>
168
169 <h2>EXIT STATUS</h2>
170 <pre>
171        This command supports the following special exit status codes
172
173        <b>20</b>     The requested format version is too old.
174
175        <b>21</b>     The requested format version is too new.
176 </pre>
177
178 <h2>SEE ALSO</h2>
179 <pre>
180        <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>
181        <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),
182        <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>
183        <a href='../notmuch-tag-1/'>much-tag</a>(1)
184 </pre>
185
186 <h2>AUTHOR</h2>
187 <pre>
188        Carl Worth and many others
189 </pre>
190
191 <h2>COPYRIGHT</h2>
192 <pre>
193        2009-2018, Carl Worth and many others
194 </pre>
195
196 <h2>0.26</h2>