Document changes to forw(1).
[mmh] / man / forw.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH FORW %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 forw \- forward messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B forw
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-annotate " | " \-noannotate ] 
14 .RB [ \-form
15 .IR formfile ]
16 .RB [ \-format " | " \-noformat ]
17 .RB [ \-filter
18 .IR filterfile ]
19 .RB [ \-inplace " | " \-noinplace ]
20 .RB [ \-mime " | " \-nomime ]
21 .RB [ \-draftfolder
22 .IR +folder ]
23 .RB [ \-draftmessage
24 .IR msg ]
25 .RB [ \-nodraftfolder ]
26 .RB [ \-editor
27 .IR editor ]
28 .RB [ \-noedit ]
29 .RB [ \-width
30 .IR colums ]
31 .RB [ \-from
32 .IR address ]
33 .RB [ \-to
34 .IR address ]
35 .RB [ \-cc
36 .IR address ]
37 .RB [ \-fcc
38 .IR +folder ]
39 .RB [ \-subject
40 .IR text ]
41 .RB [ \-whatnowproc
42 .IR program ]
43 .RB [ \-nowhatnowproc ]
44 .RB [ \-dashstuffing " | " \-nodashstuffing ]
45 .RB [ \-build ]
46 .RB [ \-file
47 .IR msgfile ]
48 .RB [ \-version ]
49 .RB [ \-help ]
50 .PP
51 .HP 5
52 .B forw
53 .RI [ +folder ]
54 .RI [ msgs ]
55 .RB [ \-digest
56 .IR list ]
57 .RB [ \-issue
58 .IR number ]
59 .RB [ \-volume
60 .IR number ]
61 [other\ switches\ for\ 
62 .BR forw ]
63 .RB [ \-version ]
64 .RB [ \-help ]
65 .ad
66 .SH DESCRIPTION
67 .B Forw
68 may be used to prepare a message containing other messages.
69 .PP
70 It constructs the new message from a forms (components) file, with a
71 body composed of the message(s) to be forwarded.  An editor is invoked
72 as in
73 .BR comp ,
74 and after editing is complete, the user is prompted
75 before the message is sent.
76 .PP
77 The default message template will direct
78 .B forw
79 to construct the draft as follows:
80 .PP
81 .RS 5
82 .nf
83 From: {from switch} or <Local-Mailbox> or <username@hostname>
84 To: {to switch} or blank
85 Fcc: {fcc switch} or +outbox
86 Subject: {subject switch} or "{original subject} (fwd)"
87 --------
88 .fi
89 .RE
90 .PP
91 If a file named
92 .RI \*(lq forwcomps \*(rq
93 exists in the user's nmh directory,
94 it will be used instead of this default form.  You may also specify an
95 alternate forms file with the switch
96 .B \-form
97 .IR formfile .
98 Forms are processed via the
99 .B nmh
100 template system; see
101 .BR mh\-format (5)
102 for details.  Components from the first forwarded message are available
103 as standard component escapes in the forms file.
104 .PP
105 In addition to the standard
106 .BR mh\-format (5)
107 escapes, the following
108 .I component
109 escapes are also supported:
110 .PP
111 .RS 5
112 .nf
113 .ta \w'nmh\-subject     'u +\w'Returns  'u
114 .I Escape       Returns Description
115 fcc     string  Any folders specified with `\-fcc\ folder'
116 nmh\-from       string  Addresses specified with `\-from\ address'
117 nmh\-to string  Addresses specified with `\-to\ address'
118 nmh\-cc string  Addresses specified with `\-cc\ address'
119 nmh\-subject    string  Any text specified with `\-subject\ text'
120 .fi
121 .RE
122 .PP
123 If the draft already exists,
124 .B forw
125 will ask you as to the disposition
126 of the draft.  A reply of
127 .B quit
128 will abort
129 .BR forw ,
130 leaving the draft intact;
131 .B replace
132 will replace the existing draft with a blank skeleton; and
133 .B list
134 will display the draft.
135 .PP
136 If the
137 .B \-annotate
138 switch is given, each message being forwarded will
139 be annotated with the lines:
140 .PP
141 .RS 5
142 .nf
143 Forwarded:\ date
144 Forwarded:\ addrs
145 .fi
146 .RE
147 .PP
148 where each address list contains as many lines as required.  This
149 annotation will be done only if the message is sent directly from
150 .BR forw .
151 If the message is not sent immediately from
152 .BR forw ,
153 .RB \*(lq comp
154 .BR \-use \*(rq
155 may be used to re\-edit and send the constructed
156 message, but the annotations won't take place.  Normally annotations
157 are done inplace in order to preserve any links to the message.  You may
158 change this by using the
159 .B \-noinplace
160 switch.
161 .PP
162 See
163 .BR comp (1)
164 for a description of the
165 .B \-editor
166 and
167 .B \-noedit
168 switches.
169 .PP
170 Although
171 .B forw
172 uses a forms (components) file to direct it how to
173 construct the beginning of the draft, it uses a message filter file to
174 direct it as to how each forwarded message should be formatted in the
175 body of the draft.  The filter file for \fIforw\fR should be a standard
176 form file for
177 .BR mhl ,
178 as
179 .B forw
180 will invoke
181 .B mhl
182 to filter (re\-format) the forwarded messages prior to being output to
183 the body of the draft.
184 .PP
185 The switches
186 .BR \-noformat ,
187 .BR \-format ,
188 and
189 .B \-filter
190 .I filterfile
191 specify which message filter file to use.
192 .PP
193 If
194 .B \-noformat
195 is specified (this is the default), then each forwarded
196 message is output into the draft exactly as it appears with no
197 .B mhl
198 filtering.
199 .PP
200 If
201 .B \-format
202 is specified, then a default message filter file is used.
203 This default message filter should be adequate for most users.
204 This default filter
205 .RI \*(lq mhl.forward \*(rq
206 is:
207 .PP
208 .RS 5
209 .nf
210 %mhl_forward%
211 .fi
212 .RE
213 .PP
214 If a file named
215 .RI \*(lq mhl.forward \*(rq
216 exists in the user's nmh
217 directory, it will be used instead of this form.  You may specify an
218 alternate message filter file with the switch
219 .B \-filter
220 .IR filterfile .
221 .PP
222 Each forwarded message is separated with an encapsulation delimiter.
223 By default, any dashes in the first column of the forwarded messages
224 will be prepended with `\-\ ' so that when received, the message is
225 suitable for bursting by
226 .BR burst .
227 This follows the Internet RFC\-934 guidelines.  You may use the flag
228 .B \-nodashstuffing
229 in order
230 to suppress this form of quoting to the forwarded messages.
231 .PP
232 For users of
233 .BR prompter ,
234 by specifying
235 .BR prompter 's
236 .B \-prepend
237 switch in the
238 .I \&.mh\(ruprofile
239 file, any commentary text is entered
240 before the forwarded messages.  (A major win!)
241 .PP
242 To use the MIME rules for encapsulation, specify the
243 .B \-mime
244 switch. This directs
245 .B forw
246 to generate an
247 .B mhbuild
248 composition file. Note that
249 .B nmh
250 will not invoke
251 .B mhbuild
252 automatically, unless you
253 add this line to your
254 .I \&.mh\(ruprofile
255 file:
256 .PP
257 .RS 5
258 .nf
259 automimeproc: 1
260 .fi
261 .RE
262 .PP
263 Otherwise, you must specifically give the command
264 .PP
265 .RS 5
266 .nf
267 What now? mime
268 .fi
269 .RE
270 .PP
271 prior to sending the draft.
272 .PP
273 The
274 .B \-draftfolder
275 .I +folder
276 and
277 .B \-draftmessage
278 .I msg
279 switches invoke the
280 .B nmh
281 draft folder facility.  This is an advanced (and highly
282 useful) feature.  Consult the
283 .BR mh-draft (5)
284 man page for more information.
285 .PP
286 The
287 .B \-editor
288 .I editor
289 switch indicates the editor to use for the
290 initial edit.  Upon exiting from the editor,
291 .B comp
292 will invoke the
293 .B whatnow
294 program.  See
295 .BR whatnow (1)
296 for a discussion of
297 available options.  The invocation of this program can be inhibited
298 by using the
299 .B \-nowhatnowproc
300 switch.  (In truth of fact, it is
301 the
302 .I whatnow
303 program which starts the initial edit.  Hence,
304 .B \-nowhatnowproc
305 will prevent any edit from occurring.)
306 .PP
307 The
308 .B \-build
309 switch is intended to be used by the Emacs mh-e interface to
310 .BR nmh .
311 It implies
312 .BR \-nowhatnowproc .
313 It causes a file <mh\-dir>/draft
314 to be created, containing the draft message that would normally be presented
315 to the user for editing.
316 No mail is actually sent.
317 .PP
318 The
319 .B \-file
320 .I msgfile
321 switch specifies the message to be forwarded as an 
322 exact filename rather than as an
323 .B nmh
324 folder and message number. It is 
325 intended to be used by the
326 .B msh
327 interface to
328 .BR nmh . 
329 This switch implies
330 .BR \-noannotate .
331 The forwarded message is simply
332 copied verbatim into the draft; the processing implied by
333 the
334 .BR \-filter ,
335 .BR \-mime ,
336 and
337 .B \-digest
338 switches is bypassed, and the usual leading and
339 trailing 'Forwarded Message' delimiters are not added.
340 The same caveats apply to this option as to the
341 .B \-build
342 switch.
343 .PP
344 The
345 .B \-digest
346 .IR list ,
347 .B \-issue
348 .IR number ,
349 and
350 .B \-volume
351 .I number
352 switches implement a digest facility for
353 .BR nmh .
354 Specifying these switches enables and/or overloads the following escapes:
355 .PP
356 .RS 5
357 .nf
358 .ta \w'Component  'u +\w'Escape  'u +\w'Returns  'u
359 .I Type Escape  Returns Description
360 component       digest  string  Argument to `\-digest'
361 function        cur     integer Argument to `\-volume'
362 function        msg     integer Argument to `\-issue'
363 .fi
364 .RE
365 .PP
366 Consult the
367 .I "Advanced Features"
368 section of the
369 .B nmh
370 User's Manual for more information on making digests.
371
372 .SH FILES
373 .fc ^ ~
374 .nf
375 .ta \w'%etcdir%/ExtraBigFileName  'u
376 ^%etcdir%/forwcomps~^The standard message skeleton
377 ^or <mh\-dir>/forwcomps~^Rather than the standard skeleton
378 ^%etcdir%/digestcomps~^The message skeleton if `\-digest' is given
379 ^or <mh\-dir>/digestcomps~^Rather than the standard skeleton
380 ^%etcdir%/mhl.forward~^The standard message filter
381 ^or <mh\-dir>/mhl.forward~^Rather than the standard filter
382 ^$HOME/\&.mh\(ruprofile~^The user profile
383 ^<mh\-dir>/draft~^The draft file
384 .fi
385
386 .SH "PROFILE COMPONENTS"
387 .fc ^ ~
388 .nf
389 .ta 2.4i
390 .ta \w'ExtraBigProfileName  'u
391 ^Path:~^To determine the user's nmh directory
392 ^Current\-Folder:~^To find the default current folder
393 ^Draft\-Folder:~^To find the default draft\-folder
394 ^Editor:~^To override the default editor
395 ^Msg\-Protect:~^To set mode when creating a new message (draft)
396 ^fileproc:~^Program to refile the message
397 ^mhlproc:~^Program to filter messages being forwarded
398 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
399 .fi
400
401 .SH "SEE ALSO"
402 mhbuild(1), comp(1), repl(1), send(1), whatnow(1), mh\-format(5),
403 .I "Proposed Standard for Message Encapsulation"
404 (RFC\-934)
405
406 .SH DEFAULTS
407 .nf
408 .RB ` +folder "' defaults to the current folder"
409 .RB ` msgs "' defaults to cur"
410 .RB ` \-noannotate '
411 .RB ` \-nodraftfolder '
412 .RB ` \-noformat '
413 .RB ` \-inplace '
414 .RB ` \-dashstuffing '
415 .RB ` \-nomime '
416 .fi
417
418 .SH CONTEXT
419 If a folder is given, it will become the current folder.
420 The first message forwarded will become the current message.
421
422 .SH BUGS
423 If
424 .I whatnowproc
425 is
426 .BR whatnow ,
427 then
428 .B forw
429 uses a built\-in
430 .BR whatnow ,
431 it does not actually run the
432 .B whatnow
433 program.
434 Hence, if you define your own
435 .IR whatnowproc ,
436 don't call it
437 .B whatnow
438 since
439 .B forw
440 won't run it.
441 .PP
442 When
443 .B forw
444 is told to annotate the messages it forwards, it
445 doesn't actually annotate them until the draft is successfully sent.
446 If from the
447 .IR whatnowproc ,
448 you
449 .B push
450 instead of
451 .BR send ,
452 it's possible to confuse
453 .B forw
454 by re\-ordering the file (e.g. by using
455 .RB \*(lq folder
456 .BR \-pack \*(rq)
457 before the message is successfully sent.
458 .B Dist
459 and
460 .B repl
461 don't have this problem.