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 |
---|
10 | scan \- produce a one line per message scan listing |
---|
11 | .SH SYNOPSIS |
---|
12 | .in +.5i |
---|
13 | .ti -.5i |
---|
14 | scan |
---|
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 |
---|
29 | folder or messages. Each \fIscan\fR line contains the message number |
---|
30 | (name), the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field, |
---|
31 | and, 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 |
---|
36 | 15+ 10/\|05 crocker nned\0\0\*(<<Last week I asked some of |
---|
37 | 16\- 10/\|05 crocker message id format\0\0\*(<<I recommend |
---|
38 | 18 10/\|06 brien Re: Exit status from mkdir |
---|
39 | 19 10/\|07*brien \*(lqscan\*(rq listing format in nmh |
---|
40 | .re |
---|
41 | .in -.5i |
---|
42 | .fi |
---|
43 | |
---|
44 | The `+' on message 15 indicates that it is the current message. |
---|
45 | |
---|
46 | The `\-' on message 16 indicates that it has been replied to, as indicated |
---|
47 | by a \*(lqReplied:\*(rq component (produced by the `\-annotate' switch |
---|
48 | to the \fIrepl\fR command). |
---|
49 | |
---|
50 | The `*' on message 19 indicates that no \*(lqDate:\*(rq header was |
---|
51 | present. The time of last modification of the message is given instead. |
---|
52 | |
---|
53 | If there is sufficient room left on the \fIscan\fR line after the |
---|
54 | subject, the line will be filled with text from the body, preceded by |
---|
55 | <<, and terminated by >> if the body is sufficiently short. \fIScan\fR |
---|
56 | actually reads each of the specified messages and parses them to extract |
---|
57 | the desired fields. During parsing, appropriate error messages will be |
---|
58 | produced if there are format errors in any of the messages. |
---|
59 | |
---|
60 | By default, \fIscan\fR will decode RFC-2047 (MIME) encoding in |
---|
61 | these scan listings. \fIScan\fR will only decode these fields if your |
---|
62 | terminal can natively display the character set used in the encoding. |
---|
63 | You should set the MM_CHARSET environment variable to your native |
---|
64 | character set, if it is not US-ASCII. See the mh-profile(5) man |
---|
65 | page for details about this environment variable. |
---|
66 | |
---|
67 | The switch `\-reverse', makes \fIscan\fR list the messages in reverse |
---|
68 | order. |
---|
69 | |
---|
70 | The `\-file filename' switch allows the user to obtain a \fIscan\fP |
---|
71 | listing of a maildrop file as produced by \fIpackf\fP. This listing |
---|
72 | includes every message in the file (you can't scan individual messages). |
---|
73 | The switch `\-reverse' is ignored with this option. |
---|
74 | |
---|
75 | The switch `\-width\ columns' may be used to specify the width of |
---|
76 | the scan line. The default is to use the width of the terminal. |
---|
77 | |
---|
78 | The `\-header' switch produces a header line prior to the \fIscan\fR |
---|
79 | listing. Currently, the name of the folder and the current date and |
---|
80 | time are output (see the \fBHISTORY\fR section for more information). |
---|
81 | |
---|
82 | If the `\-clear' switch is used and \fIscan's\fR output is directed |
---|
83 | to 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 |
---|
85 | to find out how to clear the screen prior to exiting. If the `\-clear' |
---|
86 | switch 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 |
---|
88 | to exiting. |
---|
89 | |
---|
90 | For example, the command: |
---|
91 | |
---|
92 | .ti +.5i |
---|
93 | (scan \-clear \-header; show all \-show pr \-f) | lpr |
---|
94 | |
---|
95 | produces a scan listing of the current folder, followed by a formfeed, |
---|
96 | followed by a formatted listing of all messages in the folder, one |
---|
97 | per page. Omitting `\-show\ pr\ \-f' will cause the messages to be |
---|
98 | concatenated, separated by a one\-line header and two blank lines. |
---|
99 | |
---|
100 | To override the output format used by \fIscan\fR, the `\-format\ string' |
---|
101 | or `\-form\ file' switches are used. This permits individual fields of |
---|
102 | the scan listing to be extracted with ease. The string is simply a format |
---|
103 | string and the file is simply a format file. See \fImh\-format\fR(5) |
---|
104 | for the details. |
---|
105 | |
---|
106 | In addition to the standard \fImh\-format\fR(5) escapes, \fIscan\fR |
---|
107 | also 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 |
---|
112 | body string the (compressed) first part of the body |
---|
113 | dtimenow date the current date |
---|
114 | folder string the name of the current folder |
---|
115 | .re |
---|
116 | .fi |
---|
117 | |
---|
118 | If no date header is present in the message, the \fIfunction\fR escapes |
---|
119 | which operate on {\fIdate\fP\|} will return values for the date of last |
---|
120 | modification of the message file itself. This feature is handy for |
---|
121 | scanning a \fIdraft folder\fR, as message drafts usually aren't allowed |
---|
122 | to have dates in them. |
---|
123 | |
---|
124 | \fIscan\fR will update the \fInmh\fR context prior to starting the listing, |
---|
125 | so 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 |
---|
136 | inc(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 |
---|
148 | If a folder is given, it will become the current folder. |
---|
149 | .Hi |
---|
150 | Prior to using the format string mechanism, `\-header' used to generate |
---|
151 | a heading saying what each column in the listing was. Format strings |
---|
152 | prevent this from happening. |
---|
153 | .Bu |
---|
154 | The argument to the `\-format' switch must be interpreted as a single |
---|
155 | token by the shell that invokes \fIscan\fR. Therefore, one must usually |
---|
156 | place the argument to this switch inside double\-quotes. |
---|
157 | |
---|
158 | The value of each \fIcomponent\fR escape is set by \fIscan\fR to the |
---|
159 | contents of the first message header \fIscan\fR encounters with the |
---|
160 | corresponding component name; any following headers with the same |
---|
161 | component name are ignored. |
---|
162 | .En |
---|