1NOTMUCH-SHOW(1)                     notmuch                    NOTMUCH-SHOW(1)
2
3
4

NAME

6       notmuch-show - show messages matching the given search terms
7

SYNOPSIS

9       notmuch show [option ...] <search-term> ...
10

DESCRIPTION

12       Shows all messages matching the search terms.
13
14       See  notmuch-search-terms  for  details  of  the  supported  syntax for
15       <search-terms>.
16
17       The messages will be grouped and sorted based  on  the  threading  (all
18       replies to a particular message will appear immediately after that mes‐
19       sage in date order). The output is not indented by default,  but  depth
20       tags  are  printed  so  that  proper  indentation can be performed by a
21       post-processor (such as the emacs interface to notmuch).
22
23       Supported options for show include
24
25       --duplicate=N
26              Output duplicate number N. The  numbering  starts  from  1,  and
27              matches  the  order used by search --duplicate and search --out‐
28              put=files
29
30       --entire-thread=(true|false)
31              If true, notmuch show outputs all messages in the thread of  any
32              message matching the search terms; if false, it outputs only the
33              matching messages. For --format=json and --format=sexp this  de‐
34              faults to true. For other formats, this defaults to false.
35
36       --format=(text|json|sexp|mbox|raw)
37
38              text (default for messages)
39                     The  default  plain-text format has all text-content MIME
40                     parts decoded. Various components in  the  output,  (mes‐
41                     sage,  header,  body, attachment, and MIME part), will be
42                     delimited by easily-parsed markers. Each marker  consists
43                     of  a Control-L character (ASCII decimal 12), the name of
44                     the marker, and then either an opening or closing  brace,
45                     ('{'  or '}'), to either open or close the component. For
46                     a multipart MIME message, these parts will be nested.
47
48              json   The output is formatted with Javascript  Object  Notation
49                     (JSON).  This  format is more robust than the text format
50                     for automated processing. The nested structure of  multi‐
51                     part MIME messages is reflected in nested JSON output. By
52                     default JSON output includes all messages in  a  matching
53                     thread;  that  is,  by  default, --format=json sets --en‐
54                     tire-thread. The caller can  disable  this  behaviour  by
55                     setting --entire-thread=false.  The JSON output is always
56                     encoded as UTF-8 and any message content included in  the
57                     output will be charset-converted to UTF-8.
58
59              sexp   The  output  is formatted as the Lisp s-expression (sexp)
60                     equivalent of the JSON format above. Objects are  format‐
61                     ted  as  property  lists whose keys are keywords (symbols
62                     preceded by a colon). True is formatted  as  t  and  both
63                     false  and  null  are  formatted as nil. As for JSON, the
64                     s-expression output is always encoded as UTF-8.
65
66              mbox   All matching messages are output in the traditional, Unix
67                     mbox  format  with  each message being prefixed by a line
68                     beginning with "From " and a blank line  separating  each
69                     message.  Lines  in  the  message  content beginning with
70                     "From " (preceded by zero or more '>' characters) have an
71                     additional  '>' character added. This reversible escaping
72                     is termed "mboxrd" format and described in detail here:
73                        http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html
74
75              raw (default if --part is given)
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.
79
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.
84
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.
91
92       --format-version=N
93              Use  the specified structured output format version. This is in‐
94              tended for programs that invoke notmuch internally. If  omitted,
95              the latest supported version will be used.
96
97       --part=N
98              Output  the  single decoded MIME part N of a single message. The
99              search terms must match only a single message. Message parts are
100              numbered  in  a  depth-first walk of the message MIME structure,
101              and are identified in the 'json', 'sexp' or 'text'  output  for‐
102              mats.
103
104              Note that even a message with no MIME structure or a single body
105              part still has two MIME parts:  part  0  is  the  whole  message
106              (headers and body) and part 1 is just the body.
107
108       --sort=(newest-first|oldest-first)
109              This option can be used to present results in either chronologi‐
110              cal order (oldest-first) or reverse  chronological  order  (new‐
111              est-first).
112
113              Only  threads  as  a  whole are reordered.  Ordering of messages
114              within each thread will not be affected by this flag, since that
115              order is always determined by the thread's replies.
116
117              By  default,  results will be displayed in reverse chronological
118              order, (that is, the newest results will be displayed first).
119
120       --offset=[-]N
121              Skip displaying the first N results. With the leading '-', start
122              at the Nth result from the end.
123
124       --limit=N
125              Limit the number of displayed results to N.
126
127       --verify
128              Compute and report the validity of any MIME cryptographic signa‐
129              tures found in the selected  content  (e.g.,  "multipart/signed"
130              parts). Status of the signature will be reported (currently only
131              supported with --format=json and --format=sexp), and the  multi‐
132              part/signed part will be replaced by the signed data.
133
134       --decrypt=(false|auto|true|stash)
135              If  true, decrypt any MIME encrypted parts found in the selected
136              content (e.g., "multipart/encrypted" parts). Status of  the  de‐
137              cryption  will be reported (currently only supported with --for‐
138              mat=json and --format=sexp) and  on  successful  decryption  the
139              multipart/encrypted  part will be replaced by the decrypted con‐
140              tent.
141
142              stash behaves like true, but upon successful decryption it  will
143              also  stash the message's session key in the database, and index
144              the cleartext of the message, enabling automatic  decryption  in
145              the future.
146
147              If  auto,  and  a  session key is already known for the message,
148              then it will be decrypted, but notmuch will not  try  to  access
149              the user's keys.
150
151              Use false to avoid even automatic decryption.
152
153              Non-automatic  decryption  (stash  or  true, in the absence of a
154              stashed session key) expects a functioning gpg-agent(1) to  pro‐
155              vide  any  needed  credentials. Without one, the decryption will
156              fail.
157
158              Note: setting either true or stash here implies --verify.
159
160              Here is a table that summarizes each of these policies:
161
162                       ┌──────────────┬───────┬──────┬──────┬───────┐
163                       │              │ false │ auto │ true │ stash │
164                       ├──────────────┼───────┼──────┼──────┼───────┤
165                       │Show  cleart‐ │       │ X    │ X    │ X     │
166                       │ext  if  ses‐ │       │      │      │       │
167                       │sion  key  is │       │      │      │       │
168                       │already known │       │      │      │       │
169                       ├──────────────┼───────┼──────┼──────┼───────┤
170                       │Use    secret │       │      │ X    │ X     │
171                       │keys to  show │       │      │      │       │
172                       │cleartext     │       │      │      │       │
173                       ├──────────────┼───────┼──────┼──────┼───────┤
174                       │Stash     any │       │      │      │ X     │
175                       │newly  recov‐ │       │      │      │       │
176                       │ered  session │       │      │      │       │
177                       │keys,   rein‐ │       │      │      │       │
178                       │dexing   mes‐ │       │      │      │       │
179                       │sage if found │       │      │      │       │
180                       └──────────────┴───────┴──────┴──────┴───────┘
181
182              Note: --decrypt=stash requires write  access  to  the  database.
183              Otherwise, notmuch show operates entirely in read-only mode.
184
185              Default: auto
186
187       --exclude=(true|false)
188              Specify   whether  to  omit  threads  only  matching  search.ex‐
189              clude_tags from the search results (the default) or not. In  ei‐
190              ther  case  the excluded message will be marked with the exclude
191              flag (except when output=mbox when there is nowhere to  put  the
192              flag).
193
194              If  --entire-thread  is  specified then complete threads are re‐
195              turned regardless (with the excluded flag being set when  appro‐
196              priate)  but  threads that only match in an excluded message are
197              not returned when --exclude=true.
198
199              The default is --exclude=true.
200
201       --body=(true|false)
202              If true (the default) notmuch show includes the  bodies  of  the
203              messages   in   the   output;  if  false,  bodies  are  omitted.
204              --body=false is only implemented for the  text,  json  and  sexp
205              formats and it is incompatible with --part > 0.
206
207              This is useful if the caller only needs the headers as body-less
208              output is much faster and substantially smaller.
209
210       --include-html
211              Include "text/html" parts as part of the output (currently  only
212              supported  with --format=text, --format=json and --format=sexp).
213              By default, unless --part=N is used to select a specific part or
214              --include-html is used to include all "text/html" parts, no part
215              with content type "text/html" is included in the output.
216
217       A common use of notmuch show is to display a  single  thread  of  email
218       messages. For this, use a search term of "thread:<thread-id>" as can be
219       seen in the first column of output from the notmuch-search command.
220

CONFIGURATION

222       Structured output (json / sexp) is influenced by the configuration  op‐
223       tion show.extra_headers. See notmuch-config for details.
224

EXIT STATUS

226       This command supports the following special exit status codes
227
228       20     The requested format version is too old.
229
230       21     The requested format version is too new.
231

SEE ALSO

233       notmuch,  notmuch-config,  notmuch-count,  notmuch-dump, notmuch-hooks,
234       notmuch-insert,    notmuch-new,     notmuch-reply,     notmuch-restore,
235       notmuch-search, notmuch-search-terms, notmuch-tag
236

AUTHOR

238       Carl Worth and many others
239
241       2009-2023, Carl Worth and many others
242
243
244
245
2460.38                             Sep 12, 2023                  NOTMUCH-SHOW(1)
Impressum