Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / conf / doc / RCS / scan.rf,v
1 head    1.14;
2 access;
3 symbols;
4 locks; strict;
5
6
7 1.14
8 date    95.12.06.23.22.17;      author jromine; state Exp;
9 branches;
10 next    1.13;
11
12 1.13
13 date    94.04.21.19.11.44;      author jromine; state Exp;
14 branches;
15 next    1.12;
16
17 1.12
18 date    93.08.19.20.43.27;      author jromine; state Exp;
19 branches;
20 next    1.11;
21
22 1.11
23 date    92.10.29.22.01.56;      author jromine; state Exp;
24 branches;
25 next    1.10;
26
27 1.10
28 date    92.01.29.22.56.18;      author jromine; state Exp;
29 branches;
30 next    1.9;
31
32 1.9
33 date    91.01.07.11.13.47;      author mh;      state Exp;
34 branches;
35 next    1.8;
36
37 1.8
38 date    90.04.05.15.10.08;      author sources; state Exp;
39 branches;
40 next    1.7;
41
42 1.7
43 date    90.03.22.11.31.50;      author sources; state Exp;
44 branches;
45 next    1.6;
46
47 1.6
48 date    90.03.20.19.42.32;      author sources; state Exp;
49 branches;
50 next    1.5;
51
52 1.5
53 date    90.03.20.17.36.47;      author sources; state Exp;
54 branches;
55 next    1.4;
56
57 1.4
58 date    90.03.20.10.24.48;      author sources; state Exp;
59 branches;
60 next    1.3;
61
62 1.3
63 date    90.03.18.20.48.49;      author sources; state Exp;
64 branches;
65 next    1.2;
66
67 1.2
68 date    90.03.16.15.51.59;      author sources; state Exp;
69 branches;
70 next    1.1;
71
72 1.1
73 date    90.03.16.15.47.47;      author sources; state Exp;
74 branches;
75 next    ;
76
77
78 desc
79 @@
80
81
82 1.14
83 log
84 @cleanup wording about "*" & missing Date: header
85 @
86 text
87 @.\"    @@(MHWARNING)
88 .\" @@(#)$Id: scan.rf,v 1.13 1994/04/21 19:11:44 jromine Exp jromine $
89 .SC SCAN 1
90 .NA
91 scan \- produce a one line per message scan listing
92 .SY
93 scan
94 \%[+folder] \%[msgs]
95 \%[\-clear] \%[\-noclear]
96 \%[\-form\ formatfile]
97 \%[\-format\ string]
98 \%[\-header] \%[\-noheader]
99 \%[\-width\ columns]
100 \%[\-reverse] \%[\-noreverse]
101 \%[\-file filename]
102 \%[\-help]
103 .DE
104 \fIScan\fR produces a one\-line\-per\-message listing of the specified
105 messages.
106 Each \fIscan\fR line contains the message number (name),
107 the date, the \*(lqFrom:\*(rq field, the \*(lqSubject\*(rq field, and, if room
108 allows, some of the body of the message.
109 For example:
110
111 .nf
112 .in +.5i
113 .ta \w'15+- 'u +\w'07/\|05x 'u +\w'Dcrocker  'u
114 15+     07/\|05 Dcrocker        nned\0\0\*(<<Last week I asked some of
115 16\0-   07/\|05 dcrocker        message id format\0\0\*(<<I recommend
116 18      07/\|06 Obrien  Re: Exit status from mkdir
117 19      07/\|07*        Obrien  \*(lqscan\*(rq listing format in MH
118 .re
119 .in -.5i
120 .fi
121
122 The `+' on message 15 indicates that it is the current message.
123 The `\-' on message 16 indicates that it has been
124 replied to, as indicated by a \*(lqReplied:\*(rq component (produced by
125 the `\-annotate' switch to the \fIrepl\fR command).
126 The `*' on message 19 indicates that there was no \*(lqDate:\*(rq
127 header present (the last write date of the message is given instead).
128
129 If there is sufficient room left on the \fIscan\fR line after the
130 subject, the line will be filled with text from the body,
131 preceded by <<, and terminated by >> if the body is sufficiently short.
132 \fIScan\fR actually reads each of the specified
133 messages and parses them to extract the desired fields.
134 During parsing, appropriate error messages will be produced if
135 there are format errors in any of the messages.
136
137 The `\-header' switch produces a header line prior to the \fIscan\fR
138 listing.
139 Currently,
140 the name of the folder and the current date and time are output
141 (see the \fBHISTORY\fR section for more information).
142
143 If the `\-clear' switch is used and \fIscan's\fR output is directed to a
144 terminal,
145 then \fIscan\fR will consult the \fB$TERM\fR and \fB$TERMCAP\fR
146 envariables to determine your
147 terminal type in order to find out how to clear the screen prior to exiting.
148 If the `\-clear' switch is used and \fIscan's\fR output is not directed to
149 a terminal (e.g., a pipe or a file),
150 then \fIscan\fR will send a formfeed prior to exiting.
151
152 For example, the command:
153
154 .ti +.5i
155 (scan \-clear \-header; show all \-show pr \-f) | lpr
156
157 produces a scan listing of the current folder, followed by a formfeed,
158 followed by a formatted listing of all messages in the folder, one per
159 page.  Omitting `\-show\ pr\ \-f' will cause the messages to be concatenated,
160 separated by a one\-line header and two blank lines.
161
162 To override the output format used by \fIscan\fR,
163 the `\-format\ string' or `\-form\ file' switches are used.
164 This permits individual fields of the scan listing to be extracted with ease.
165 The string is simply a format string and the file is simply a format file.
166 See \fImh\-format\fR\0(5) for the details.
167
168 In addition to the standard \fImh\-format\fR\0(5) escapes,
169 \fIscan\fR also recognizes the following additional \fIcomponent\fR escapes:
170 .sp 1
171 .nf
172 .ta \w'Dtimenow  'u +\w'Returns  'u
173 \fIEscape\fR    \fIReturns\fR   \fIDescription\fR
174 body    string  the (compressed) first part of the body
175 dtimenow        date    the current date
176 folder  string  the name of the current folder
177 .re
178 .fi
179
180 .\" and the following \fIfunction\fP escape:
181 .\" .sp 1
182 .\" .nf
183 .\" .ta \w'Dcompflagxfolderx  'u +\w'Returns  'u
184 .\" \fIEscape\fR        \fIReturns\fR   \fIDescription\fR
185 .\" compflag{folder}    integer boolean state of `\-header'
186 .\" .re
187 .\" .fi
188 .\" 
189 If no date header is present in the message, the \fIfunction\fR
190 escapes which operate on {\fIdate\fP\|} will return values for the 
191 date of last modification of the message file itself.
192 This is particularly handy for scanning a \fIdraft folder\fR,
193 as message drafts usually aren't allowed to have dates in them.
194
195 \fIscan\fR will update the \fIMH\fR context prior to starting the listing,
196 so interrupting a long \fIscan\fR listing preserves the new context.
197 \fIMH\fR purists hate this idea.
198 .Fi
199 ^$HOME/\&.mh\(ruprofile~^The user profile
200 .Pr
201 ^Path:~^To determine the user's MH directory
202 .Ps
203 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
204 .Ps
205 ^Current\-Folder:~^To find the default current folder
206 .Sa
207 inc(1), pick(1), show(1), mh\-format(5)
208 .De
209 `+folder' defaults to the folder current
210 .Ds
211 `msgs' defaults to all
212 .Ds
213 `\-format' defaulted as described above
214 .Ds
215 `\-noheader'
216 .Ds
217 `\-width' defaulted to the width of the terminal
218 .Co
219 If a folder is given, it will become the current folder.
220 .Hi
221 Prior to using the format string mechanism,
222 `\-header' used to generate a heading saying what each column in the listing
223 was.
224 Format strings prevent this from happening.
225 .Bu
226 The argument to the `\-format' switch must be interpreted as a single token
227 by the shell that invokes \fIscan\fR.
228 Therefore,
229 one must usually place the argument to this switch inside double\-quotes.
230 .br
231 The value of
232 each \fIcomponent\fR escape is set by \fIscan\fR to the contents
233 of the first message header \fIscan\fR encounters
234 with the corresponding component name;
235 any following headers with the same component name are ignored.
236 .sp
237 The switch `\-reverse', makes \fIscan\fR list the messages
238 in reverse order; this should be considered a bug.
239 .sp
240 The `\-file filename' switch allows the user to obtain a \fIscan\fP
241 listing of a maildrop file as produced by \fIpackf\fP.  This listing
242 includes every message in the file.  The user should use \fImsh\fP
243 for more selective processing of the file.  `\-reverse' is ignored
244 with this option.
245 .En
246 @
247
248
249 1.13
250 log
251 @consider documenting compflag{folder}
252 @
253 text
254 @d2 1
255 a2 1
256 .\" @@(#)$Id: scan.rf,v 1.12 1993/08/19 20:43:27 jromine Exp jromine $
257 d27 5
258 a31 5
259 .ta \w'15+- 'u +\w'7/\05  'u +\w'Dcrocker  'u
260 15+     7/\05   Dcrocker        nned\0\0\*(<<Last week I asked some of
261 16\0-   7/\05   dcrocker        message id format\0\0\*(<<I recommend
262 18      7/\06   Obrien  Re: Exit status from mkdir
263 19      7/\07   Obrien  \*(lqscan\*(rq listing format in MH
264 d38 4
265 a41 2
266 replied to, as indicated by a \*(lqReplied:\*(rq component produced by
267 an `\-annotate' switch to the \fIrepl\fR command.
268 a75 7
269 If \fIscan\fR encounters a message without a \*(lqDate:\*(rq field,
270 rather than leaving that portion of the scan listing blank,
271 the date is filled\-in with the last write date of the message,
272 and post\-fixed with a `*'.
273 This is particularly handy for scanning a \fIdraft folder\fR,
274 as message drafts usually aren't allowed to have dates in them.
275
276 d103 1
277 a103 1
278 Also, if no date header was present in the message, the \fIfunction\fR
279 d106 2
280 @
281
282
283 1.12
284 log
285 @typo
286 @
287 text
288 @d2 1
289 a2 1
290 .\" @@(#)$Id: scan.rf,v 1.11 1992/10/29 22:01:56 jromine Exp jromine $
291 d99 9
292 @
293
294
295 1.11
296 log
297 @document dtimenow
298 @
299 text
300 @d2 1
301 a2 1
302 .\" @@(#)$Id: scan.rf,v 1.10 1992/01/29 22:56:18 jromine Exp jromine $
303 d82 1
304 a82 1
305 the `\-format\ string' or `\-format\ file' switches are used.
306 @
307
308
309 1.10
310 log
311 @document %{folder}
312 @
313 text
314 @d2 1
315 a2 1
316 .\" @@(#)$Id: scan.rf,v 1.9 1991/01/07 11:13:47 mh Exp jromine $
317 d91 1
318 a91 1
319 .ta \w'Escape  'u +\w'Returns  'u
320 d94 1
321 a101 1
322
323 @
324
325
326 1.9
327 log
328 @document scan -file filename
329 jlr
330 @
331 text
332 @d2 1
333 a2 1
334 .\" @@(#)$Id: scan.rf,v 1.8 90/04/05 15:10:08 sources Exp Locker: mh $
335 d88 1
336 a88 1
337 \fIscan\fR also recognizes the following additional \fIcomponent\fR escape:
338 d94 1
339 @
340
341
342 1.8
343 log
344 @add ID
345 @
346 text
347 @d2 1
348 a2 1
349 .\" @@(#)$Id:$
350 d15 1
351 d98 1
352 a98 1
353 escapes which operate on {\fIdate\|} will return values for the 
354 d101 1
355 d143 1
356 a143 1
357 .br
358 d146 6
359 @
360
361
362 1.7
363 log
364 @put things back, do .NA stuff another way
365 @
366 text
367 @d2 1
368 @
369
370
371 1.6
372 log
373 @typo
374 @
375 text
376 @d2 2
377 a3 2
378 .TH SCAN 1 @@(MHCENTERFOOT) @@(MHLEFTFOOT)
379 .SH .NA
380 d5 1
381 a5 1
382 .SH .SY
383 @
384
385
386 1.5
387 log
388 @fixup for makewhatis
389 @
390 text
391 @d2 1
392 a2 1
393 .TH SCAN 1 [mh.6] MH
394 @
395
396
397 1.4
398 log
399 @mention using st_mtime
400 @
401 text
402 @d2 2
403 a3 2
404 .SC SCAN 1
405 .NA
406 d5 1
407 a5 1
408 .SY
409 @
410
411
412 1.3
413 log
414 @document component escape semantics
415 @
416 text
417 @d95 4
418 @
419
420
421 1.2
422 log
423 @fixup
424 @
425 text
426 @d85 1
427 a85 1
428 In addition to the standard escapes,
429 a94 1
430 In addition,
431 d97 1
432 a97 1
433 \fIMH\fR purists hate both of these ideas.
434 d130 6
435 @
436
437
438 1.1
439 log
440 @Initial revision
441 @
442 text
443 @d13 1
444 d86 2
445 a87 1
446 \fIscan\fR also recognizes the following additional escape:
447 d89 3
448 a91 3
449 .ta \w'escape  'u
450 \fIescape\fR    \fIsubstitution\fR
451 body    the (compressed) first part of the body
452 a94 3
453 On hosts where \fIMH\fR was configured with the BERK option,
454 \fIscan\fR has two other switches: `\-reverse', and `\-noreverse'.
455 These make \fIscan\fR list the messages in reverse order.
456 d131 3
457 @