source: trunk/third/nmh/man/scan.man @ 12455

Revision 12455, 5.9 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1.\"
2.\" %nmhwarning%
3.\" $Id: scan.man,v 1.1.1.1 1999-02-07 18:14:22 danw Exp $
4.\"
5.\" include the -mh macro file
6.so %etcdir%/tmac.h
7.\"
8.TH SCAN %manext1% MH.6.8 [%nmhversion%]
9.SH NAME
10scan \- produce a one line per message scan listing
11.SH SYNOPSIS
12.in +.5i
13.ti -.5i
14scan
15\%[+folder] \%[msgs]
16\%[\-clear] \%[\-noclear]
17\%[\-form\ formatfile]
18\%[\-format\ string]
19\%[\-header] \%[\-noheader]
20\%[\-width\ columns]
21\%[\-reverse] \%[\-noreverse]
22\%[\-file filename]
23.br
24\%[\-version]
25\%[\-help]
26.in -.5i
27.SH DESCRIPTION
28\fIScan\fR produces a one\-line\-per\-message listing of the specified
29folder or messages.  Each \fIscan\fR line contains the message number
30(name), the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field,
31and, if room allows, some of the body of the message.  For example:
32
33.nf
34.in +.5i
35.ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker  'u
3615+     10/\|05 crocker nned\0\0\*(<<Last week I asked some of
3716\-    10/\|05 crocker message id format\0\0\*(<<I recommend
3818      10/\|06 brien   Re: Exit status from mkdir
3919      10/\|07*brien   \*(lqscan\*(rq listing format in nmh
40.re
41.in -.5i
42.fi
43
44The `+' on message 15 indicates that it is the current message.
45
46The `\-' on message 16 indicates that it has been replied to, as indicated
47by a \*(lqReplied:\*(rq component (produced by the `\-annotate' switch
48to the \fIrepl\fR command).
49
50The `*' on message 19 indicates that no \*(lqDate:\*(rq header was
51present.  The time of last modification of the message is given instead.
52
53If there is sufficient room left on the \fIscan\fR line after the
54subject, the line will be filled with text from the body, preceded by
55<<, and terminated by >> if the body is sufficiently short.  \fIScan\fR
56actually reads each of the specified messages and parses them to extract
57the desired fields.  During parsing, appropriate error messages will be
58produced if there are format errors in any of the messages.
59
60By default, \fIscan\fR will decode RFC-2047 (MIME) encoding in
61these scan listings.  \fIScan\fR will only decode these fields if your
62terminal can natively display the character set used in the encoding.
63You should set the MM_CHARSET environment variable to your native
64character set, if it is not US-ASCII.  See the mh-profile(5) man
65page for details about this environment variable.
66
67The switch `\-reverse', makes \fIscan\fR list the messages in reverse
68order.
69
70The `\-file filename' switch allows the user to obtain a \fIscan\fP
71listing of a maildrop file as produced by \fIpackf\fP.  This listing
72includes every message in the file (you can't scan individual messages).
73The switch `\-reverse' is ignored with this option.
74
75The switch `\-width\ columns' may be used to specify the width of
76the scan line.  The default is to use the width of the terminal.
77
78The `\-header' switch produces a header line prior to the \fIscan\fR
79listing.  Currently, the name of the folder and the current date and
80time are output (see the \fBHISTORY\fR section for more information).
81
82If the `\-clear' switch is used and \fIscan's\fR output is directed
83to a terminal, then \fIscan\fR will consult the environment variables
84\fB$TERM\fR and \fB$TERMCAP\fR to determine your terminal type in order
85to find out how to clear the screen prior to exiting.  If the `\-clear'
86switch is used and \fIscan's\fR output is not directed to a terminal
87(e.g., a pipe or a file), then \fIscan\fR will send a formfeed prior
88to exiting.
89
90For example, the command:
91
92.ti +.5i
93(scan \-clear \-header; show all \-show pr \-f) | lpr
94
95produces a scan listing of the current folder, followed by a formfeed,
96followed by a formatted listing of all messages in the folder, one
97per page.  Omitting `\-show\ pr\ \-f' will cause the messages to be
98concatenated, separated by a one\-line header and two blank lines.
99
100To override the output format used by \fIscan\fR, the `\-format\ string'
101or `\-form\ file' switches are used.  This permits individual fields of
102the scan listing to be extracted with ease.  The string is simply a format
103string and the file is simply a format file.  See \fImh\-format\fR(5)
104for the details.
105
106In addition to the standard \fImh\-format\fR(5) escapes, \fIscan\fR
107also recognizes the following additional \fIcomponent\fR escapes:
108.sp 1
109.nf
110.ta \w'Dtimenow  'u +\w'Returns  'u
111\fIEscape\fR    \fIReturns\fR   \fIDescription\fR
112body    string  the (compressed) first part of the body
113dtimenow        date    the current date
114folder  string  the name of the current folder
115.re
116.fi
117
118If no date header is present in the message, the \fIfunction\fR escapes
119which operate on {\fIdate\fP\|} will return values for the date of last
120modification of the message file itself.  This feature is handy for
121scanning a \fIdraft folder\fR, as message drafts usually aren't allowed
122to have dates in them.
123
124\fIscan\fR will update the \fInmh\fR context prior to starting the listing,
125so interrupting a long \fIscan\fR listing preserves the new context.
126\fInmh\fR purists hate this idea.
127.Fi
128^$HOME/\&.mh\(ruprofile~^The user profile
129.Pr
130^Path:~^To determine the user's nmh directory
131.Ps
132^Alternate\-Mailboxes:~^To determine the user's mailboxes
133.Ps
134^Current\-Folder:~^To find the default current folder
135.Sa
136inc(1), pick(1), show(1), mh\-format(5)
137.De
138`+folder' defaults to the current folder
139.Ds
140`msgs' defaults to all
141.Ds
142`\-format' defaulted as described above
143.Ds
144`\-noheader'
145.Ds
146`\-width' defaulted to the width of the terminal
147.Co
148If a folder is given, it will become the current folder.
149.Hi
150Prior to using the format string mechanism, `\-header' used to generate
151a heading saying what each column in the listing was.  Format strings
152prevent this from happening.
153.Bu
154The argument to the `\-format' switch must be interpreted as a single
155token by the shell that invokes \fIscan\fR.  Therefore, one must usually
156place the argument to this switch inside double\-quotes.
157
158The value of each \fIcomponent\fR escape is set by \fIscan\fR to the
159contents of the first message header \fIscan\fR encounters with the
160corresponding component name; any following headers with the same
161component name are ignored.
162.En
Note: See TracBrowser for help on using the repository browser.