-.\"
+.TH SCAN %manext1% 2014-01-20 "%nmhversion%"
+.
.\" %nmhwarning%
-.\" $Id$
-.\"
-.TH SCAN %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
+.
.SH NAME
-scan \- produce a one line per message scan listing
+scan \- produce a summary listing of nmh messages
.SH SYNOPSIS
.HP 5
.na
.B scan
+.RB [ \-help ]
+.RB [ \-version ]
.RI [ +folder ]
.RI [ msgs ]
.RB [ \-clear " | " \-noclear ]
.RB [ \-reverse " | " \-noreverse ]
.RB [ \-file
.IR filename ]
-.RB [ \-version ]
-.RB [ \-help ]
.ad
.SH DESCRIPTION
-.B Scan
-produces a one\-line\-per\-message listing of the specified
+.B scan
+produces a one-line-per-message listing of the specified
folder or messages. Each
.B scan
line contains the message number
.nf
.ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker 'u
15+ 10/\|05 crocker nned\0\0<<Last week I asked some of
-16\- 10/\|05 crocker message id format\0\0\<<I recommend
+16\- 10/\|05 crocker message id format\0\0<<I recommend
18 10/\|06 brien Re: Exit status from mkdir
19 10/\|07*brien \*(lqscan\*(rq listing format in nmh
.fi
line after the
subject, the line will be filled with text from the body, preceded by
\*(lq<<\*(rq, and terminated by \*(lq>>\*(rq if the body is sufficiently short.
-.B Scan
+.B scan
actually reads each of the specified messages and parses them to extract
the desired fields. During parsing, appropriate error messages will be
produced if there are format errors in any of the messages.
.PP
By default,
.B scan
-will decode RFC-2047 (MIME) encoding in
+will decode RFC 2047 (MIME) encoding in
these scan listings.
-.B Scan
+.B scan
will only decode these fields if your
terminal can natively display the character set used in the encoding.
-You should set the MM_CHARSET environment variable to your native
-character set, if it is not US-ASCII. See the mh-profile(5) man
-page for details about this environment variable.
+You should set the appropriate
+.IR locale (1)
+environment variables to your native
+character set, if it is not US-ASCII. See
+.IR locale (1)
+for more details on the appropriate environment variables.
.PP
The switch
.BR \-reverse ,
.I filename
switch allows the user to obtain a
.B scan
-listing of a maildrop file as produced by
+listing of a mail drop file as produced by
.BR packf .
This listing
includes every message in the file (you can't scan individual messages).
per page. Omitting
.RB \*(lq "\-show\ pr\ \-f" \*(rq
will cause the messages to be
-concatenated, separated by a one\-line header and two blank lines.
+concatenated, separated by a one-line header and two blank lines.
.PP
To override the output format used by
.BR scan ,
switches are used. This permits individual fields of
the scan listing to be extracted with ease. The string is simply a format
string and the file is simply a format file. See
-.BR mh\-format (5)
+.IR mh\-format (5)
for the details.
.PP
In addition to the standard
-.BR mh\-format (5)
+.IR mh\-format (5)
escapes,
.B scan
also recognizes the following additional
.RS 5
.nf
.ta \w'Dtimenow 'u +\w'Returns 'u
-.I Escape Returns Description
+.I "Escape Returns Description"
body string the (compressed) first part of the body
dtimenow date the current date
folder string the name of the current folder
.fi
.RE
.PP
+.RB { body }
+returns a string without MIME decoding,
+i.e.\& the MIME boundary seperator may be the first text shown.
+.PP
If no date header is present in the message, the
.I function
escapes
scanning a draft folder, as message drafts usually aren't allowed
to have dates in them.
.PP
+The
+.B %nmhetcdir%
+directory contains several format files as examples of customized
+.B scan
+output.
+.PP
.B scan
will update the
.B nmh
listing preserves the new context.
.B nmh
purists hate this idea.
-
.SH FILES
.fc ^ ~
.nf
-.ta \w'%etcdir%/ExtraBigFileName 'u
-^$HOME/\&.mh\(ruprofile~^The user profile
+.ta \w'%nmhetcdir%/ExtraBigFileName 'u
+^$HOME/.mh_profile~^The user profile
.fi
-
.SH "PROFILE COMPONENTS"
.fc ^ ~
.nf
^Alternate\-Mailboxes:~^To determine the user's mailboxes
^Current\-Folder:~^To find the default current folder
.fi
-
.SH "SEE ALSO"
-inc(1), pick(1), show(1), mh\-format(5)
-
+.IR pick (1),
+.IR show (1),
+.IR mh\-format (5)
.SH DEFAULTS
.nf
.RB ` +folder "' defaults to the current folder"
.RB ` \-noheader '
.RB ` \-width "' defaulted to the width of the terminal"
.fi
-
.SH CONTEXT
If a folder is given, it will become the current folder.
-
.SH HISTORY
Prior to using the format string mechanism,
.B \-header
used to generate
a heading saying what each column in the listing was. Format strings
prevent this from happening.
-
.SH BUGS
-The argument to the
-.B \-format
-switch must be interpreted as a single
-token by the shell that invokes
-.BR scan .
-Therefore, one must usually
-place the argument to this switch inside double\-quotes.
-.PP
The value of each
.I component
escape is set by