Fix typo in man page
[mmh] / man / repl.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH REPL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 repl \- reply to a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B repl
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-annotate " | " \-noannotate ] 
14 .RB [ \-group " | " \-nogroup ]
15 .RB [ \-cc
16 all/to/cc/me]
17 .RB [ \-nocc
18 all/to/cc/me]
19 .RB [ \-query " | " \-noquery ]
20 .RB [ \-form
21 .IR formfile ]
22 .RB [ \-format " | " \-noformat ]
23 .RB [ \-filter
24 .IR filterfile ]
25 .RB [ \-inplace " | " \-noinplace ]
26 .RB [ \-mime " | " \-nomime ]
27 .RB [ \-fcc
28 .IR +folder ]
29 .RB [ \-width
30 .IR columns ]
31 .RB [ \-draftfolder
32 .IR +folder ]
33 .RB [ \-draftmessage
34 .IR msg ]
35 .RB [ \-nodraftfolder ]
36 .RB [ \-editor
37 .IR editor ]
38 .RB [ \-noedit ]
39 .RB [ \-whatnowproc
40 .IR program ]
41 .RB [ \-nowhatnowproc ]
42 .RB [ \-atfile ]
43 .RB [ \-noatfile ]
44 .RB [ \-build ]
45 .RB [ \-file
46 .IR msgfile ]
47 .RB [ \-version ]
48 .RB [ \-help ]
49 .ad
50 .SH DESCRIPTION
51 .B Repl
52 may be used to produce a reply to an existing message.
53 .PP
54 In its simplest form (with no arguments),
55 .B repl
56 will set up a
57 message\-form skeleton in reply to the current message in the current
58 folder, and invoke the whatnow shell.
59 .PP
60 In order to construct the message draft of the reply,
61 .B repl
62 uses
63 a reply template to guide its actions.  A reply template is simply a
64 .B mhl
65 format file (see
66 .BR mh\-format (5)
67 for details).
68 .PP
69 If the switch
70 .B \-nogroup
71 is given (it is on by default), then
72 .B repl
73 will use the standard forms file \*(lqreplcomps\*(rq.  This will construct
74 a draft message that is intended to be sent only to the author of the
75 message to which you are replying.  If a file named \*(lqreplcomps\*(rq
76 exists in the user's
77 .B nmh
78 directory, it will be used instead of this
79 default forms file.
80 .PP
81 The default reply template \*(lqreplcomps\*(rq will direct
82 .B repl
83 to construct the reply message draft as follows:
84 .PP
85 .RS 5
86 .nf
87 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
88 cc: <To> and <cc> and <personal address>
89 Fcc: {fcc switch} or +outbox
90 Subject: Re: <Subject>
91 In\-Reply\-To: <Message\-Id>
92 References: <Message\-Id>
93 Comments: In\-Reply\-To <From> or <apparently from> or <Sender>
94 .ti +3 
95 message dated <date>
96 --------
97 .fi
98 .RE
99 .PP
100 where field names enclosed in angle brackets (<\ >) indicate the
101 contents of the named field from the message to which the reply is
102 being made.
103 .PP
104 By default, the \*(lqcc:\*(rq field is empty.  You may selectively add
105 addresses to this default with the
106 .B \-cc
107 .I type
108 switch.  This switch takes an
109 argument (
110 .IR all / to / cc / me )
111 which specifies who gets added to the default
112 \*(lqcc:\*(rq list of the reply.  You may give this switch multiple times (with
113 different arguments) if you wish to add multiple types of addresses.
114 .PP
115 If the switch
116 .B \-group
117 is given, then
118 .B repl
119 will use the the
120 standard forms file \*(lqreplgroupcomps\*(rq.  This will construct a
121 draft message that is intended as a group or followup reply.  If a file
122 named \*(lqreplgroupcomps\*(rq exists in the user's nmh directory, it
123 will be used instead of this default forms file.
124 .PP
125 The default group reply template \*(lqreplgroupcomps\*(rq will direct
126 .B repl
127 to construct the reply message draft as follows:
128 .PP
129 .RS 5
130 .nf
131 To: <Mail\-Followup\-To>
132 Subject: Re: <Subject>
133 In\-Reply\-To: Message from <From> of <Date>.
134 .ti +\w'In\-Reply\-To: 'u
135 <Message\-Id>
136 --------
137 .fi
138 .RE
139 .PP
140 or if the field <Mail\-Followup\-To> is not available:
141 .PP
142 .RS 5
143 .nf
144 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
145 cc: <To> and <cc> and <personal address>
146 Subject: Re: <Subject>
147 In\-Reply\-To: Message from <From> of <Date>.
148 .ti +\w'In\-Reply\-To: 'u
149 <Message\-Id>
150 --------
151 .fi
152 .RE
153 .PP
154 By default, the \*(lqcc:\*(rq contains all the addresses shown.  You may
155 selectively remove addresses from this default with the
156 .B \-nocc
157 .I type
158 switch.
159 This switch takes an argument (
160 .IR all / to / cc / me )
161 which specifies who gets removed
162 from the default \*(lqcc:\*(rq list of the reply.  You may give this switch
163 multiple times (with different arguments) if you wish to remove multiple types
164 of addresses.
165 .PP
166 In any case, you may specify an alternate forms file with the switch
167 .B \-form
168 .IR formfile .
169 .PP
170 The
171 .B \-query
172 switch modifies the action of
173 .B \-nocc
174 .I type
175 switch by
176 interactively asking you if each address that normally would be placed in
177 the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
178 This is useful for special\-purpose replies.  Note that the position of
179 the
180 .B \-cc
181 and
182 .B \-nocc
183 switches, like all other switches which take a
184 positive and negative form, is important.
185 .PP
186 Lines beginning with the fields \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
187 \*(rqBcc:\*(rq will be standardized and have duplicate addresses removed.
188 In addition, the
189 .B \-width
190 .I columns
191 switch will guide
192 .BR repl 's
193 formatting of these fields.
194 .PP
195 If the draft already exists,
196 .B repl
197 will ask you as to the disposition
198 of the draft.  A reply of
199 .B quit
200 will abort
201 .BR repl ,
202 leaving the
203 draft intact;
204 .B replace
205 will replace the existing draft with a blank
206 skeleton; and
207 .B list
208 will display the draft.
209 .PP
210 See
211 .BR comp (1)
212 for a description of the
213 .B \-editor
214 and
215 .B \-noedit
216 switches.  Note that while in the editor, the message being replied
217 to is available through a link named \*(lq@\*(rq (assuming the default
218 .IR whatnowproc ).
219 In addition, the actual pathname of the message is
220 stored in the environment variable
221 .BR $editalt ,
222 and the pathname of
223 the folder containing the message is stored in the environment variable
224 .BR $mhfolder .
225 The creation of the \*(lq@\*(rq file and associated environment variables
226 can be controlled via the
227 .B \-atfile
228 and
229 .B \-noatfile
230 options.
231 .PP
232 Although
233 .B repl
234 uses a forms file to direct it how to construct
235 the beginning of the draft, it uses a message filter file to direct
236 it as to how the message to which you are replying should be filtered
237 (re\-formatted) in the body of the draft.  The filter file for
238 .B repl
239 should be a standard form file for
240 .BR mhl ,
241 as
242 .B repl
243 will invoke
244 .B mhl
245 to format the message to which you are replying.
246 .PP
247 The switches
248 .BR \-noformat ,
249 .BR \-format ,
250 and
251 .B \-filter
252 .I filterfile
253 specify
254 which message filter file to use.
255 .PP
256 If the switch
257 .B \-noformat
258 is given (it is the default), then the message
259 to which you are replying is not included in the body of the draft.
260 .PP
261 If the switch
262 .B \-format
263 is given, then a default message filter file
264 is used.  This default message filter should be adequate for most users.
265 This default filter
266 .RI \*(lq mhl.reply \*(rq
267 is:
268 .PP
269 .RS 5
270 .nf
271 %mhl_reply%
272 .fi
273 .RE
274 .PP
275 which outputs each line of the body of the message prefaced with the
276 \*(lq>\*(rq character and a space.
277 .PP
278 If a file named
279 .RI \*(lq mhl.reply \*(rq
280 exists in the user's
281 .B nmh
282 directory,
283 it will be used instead of this form.  You may specify an alternate
284 message filter file with the switch
285 .B \-filter
286 .IR filterfile .
287 .PP
288 Other reply filters are commonly used, such as:
289 .PP
290 .RS 5
291 .nf
292 :
293 body:nocomponent,compwidth=9,offset=9
294 .fi
295 .RE
296 .PP
297 which says to output a blank line and then the body of the message
298 being replied\-to, indented by one tab\-stop.  Another popular format
299 is:
300 .PP
301 .RS 5
302 .nf
303 message-id:nocomponent,\|nonewline,\\
304 formatfield=\*(lqIn message %{text},\ \*(rq
305 from:nocomponent,\|formatfield=\*(lq%(decode(friendly{text})) writes:\*(rq
306 body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
307 .fi
308 .RE
309 .PP
310 This message filter file cites the Message-ID and author of the message
311 being replied\-to, and then outputs each line of the body prefaced with
312 the \*(lq>\*(rq character.
313 .PP
314 You can also use an external format program to format the message body.
315 The format program is specified by the
316 .IR formatproc
317 profile entry, and is enabled by the \*(lqformat\*(rq flag.  A message
318 filter using an external format program would look like this:
319 .PP
320 .RS 5
321 .nf
322 body:component=\*(lq>\*(rq,\|nowrap,\|format
323 .fi
324 .RE
325 .PP
326 See the
327 .BR mhl(1)
328 documentation for more information.
329 .PP
330 To use the MIME rules for encapsulation, specify the
331 .B \-mime
332 switch.
333 This directs
334 .B repl
335 to generate an
336 .B mhbuild
337 composition file.
338 Note that
339 .B nmh
340 will not invoke
341 .B mhbuild
342 automatically, unless you
343 add this line to your
344 .I \&.mh\(ruprofile
345 file:
346 .PP
347 .RS 5
348 automimeproc: 1
349 .RE
350 .PP
351 Otherwise, you must specifically give the command
352 .PP
353 .RS 5
354 What now? mime
355 .RE
356 .PP
357 prior to sending the draft.
358 .PP
359 If the
360 .B \-annotate
361 switch is given, the message being replied\-to will
362 be annotated with the lines
363 .PP
364 .RS 5
365 Replied:\ date
366 Replied:\ addrs
367 .RE
368 .PP
369 where the address list contains one line for each addressee.
370 The annotation will be done only if the message is sent directly from
371 .BR repl .
372 If the message is not sent immediately from
373 .BR repl ,
374 .RB \*(lq "comp\ \-use" \*(rq
375 may be used to re\-edit and send the constructed
376 message, but the annotations won't take place.  Normally annotations are
377 done inplace in order to preserve any links to the message.  You may use
378 the
379 .B \-noinplace
380 switch to change this.
381 .PP
382 Although the default template specifies that a copy of the reply will be
383 put in
384 the folder 'outbox',
385 if the
386 .B \-fcc
387 .I +folder
388 switch is given it will override the default value.
389 More than one folder, each preceded by
390 .B \-fcc
391 can
392 be named.
393 .PP
394 In addition to the standard
395 .BR mh\-format (5)
396 escapes,
397 .B repl
398 also recognizes the following additional
399 .I component
400 escape:
401 .PP
402 .RS 5
403 .nf
404 .ta \w'Escape  'u +\w'Returns  'u
405 .I "Escape      Returns Description"
406 fcc     string  Any folders specified with `\-fcc\ folder'
407 .fi
408 .RE
409 .PP
410 To avoid reiteration,
411 .B repl
412 strips any leading `Re: ' strings from
413 the
414 .I subject
415 component.
416 .PP
417 The
418 .B \-draftfolder
419 .I +folder
420 and
421 .B \-draftmessage
422 .I msg
423 switches invoke
424 the
425 .B nmh
426 draft folder facility.  This is an advanced (and highly
427 useful) feature.  Consult the
428 .BR mh-draft (5)
429 man page for more
430 information.
431 .PP
432 Upon exiting from the editor,
433 .B repl
434 will invoke the
435 .B whatnow
436 program.  See
437 .BR whatnow (1)
438 for a discussion of available
439 options.  The invocation of this program can be inhibited by using the
440 .B \-nowhatnowproc
441 switch.  (In truth of fact, it is the
442 .B whatnow
443 program which starts the initial edit.  Hence,
444 .B \-nowhatnowproc
445 will
446 prevent any edit from occurring.)
447 .PP
448 The
449 .B \-build
450 switch is intended to be used by the Emacs mh-e interface
451 to
452 .BR nmh .
453 It implies
454 .BR \-nowhatnowproc .
455 It causes a file
456 .I <mh\-dir>/reply
457 to be created, containing the draft message that would normally be presented
458 to the user for editing.
459 No mail is actually sent.
460 .PP
461 The
462 .B \-file
463 .I msgfile
464 switch specifies the message to be replied to as an 
465 exact filename rather than as an
466 .B nmh
467 folder and message number. It is 
468 intended to be used by the
469 .B msh
470 interface to
471 .BR nmh . 
472 The same caveats apply to this option as to the
473 .B \-build
474 switch.
475
476 .SH FILES
477 .fc ^ ~
478 .nf
479 .ta \w'%etcdir%/ExtraBigFileName  'u
480 ^%etcdir%/replcomps~^The standard reply template
481 ^or <mh\-dir>/replcomps~^Rather than the standard template
482 ^%etcdir%/replgroupcomps~^The standard `reply -group' template
483 ^or <mh\-dir>/replgroupcomps~^Rather than the standard template
484 ^%etcdir%/mhl.reply~^The standard message filter
485 ^or <mh\-dir>/mhl.reply~^Rather than the standard filter
486 ^$HOME/\&.mh\(ruprofile~^The user profile
487 ^<mh\-dir>/draft~^The draft file
488 .fi
489
490 .SH "PROFILE COMPONENTS"
491 .fc ^ ~
492 .nf
493 .ta 2.4i
494 .ta \w'ExtraBigProfileName  'u
495 ^Path:~^To determine the user's nmh directory
496 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
497 ^Current\-Folder:~^To find the default current folder
498 ^Draft\-Folder:~^To find the default draft\-folder
499 ^Editor:~^To override the default editor
500 ^Msg\-Protect:~^To set mode when creating a new message (draft)
501 ^fileproc:~^Program to refile the message
502 ^mhlproc:~^Program to filter message being replied\-to
503 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
504 .fi
505
506 .SH "SEE ALSO"
507 mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5)
508
509 .SH DEFAULTS
510 .nf
511 .RB ` +folder "' defaults to the current folder"
512 .RB ` msg "' defaults to cur"
513 .RB ` \-nogroup '
514 .RB ` "\-nocc\ all" "' with `\-nogroup', `\-cc\ all' with `\-group'"
515 .RB ` \-noannotate '
516 .RB ` \-nodraftfolder '
517 .RB ` \-noformat '
518 .RB ` \-inplace '
519 .RB ` \-nomime '
520 .RB ` \-noquery '
521 .RB ` \-atfile '
522 .RB ` "\-width\ 72" '
523 .fi
524
525 .SH CONTEXT
526 If a folder is given, it will become the current folder.  The message
527 replied\-to will become the current message.
528
529 .SH BUGS
530 If any addresses occur in the reply template, addresses in the template
531 that do not contain hosts are defaulted incorrectly.  Instead of using
532 the localhost for the default,
533 .B repl
534 uses the sender's host.
535 Moral of the story: if you're going to include addresses in a reply
536 template, include the host portion of the address.
537 .PP
538 The
539 .B \-width
540 .I columns
541 switch is only used to do address-folding; other
542 headers are not line\-wrapped.
543 .PP
544 If
545 .I whatnowproc
546 is
547 .BR whatnow ,
548 then
549 .B repl
550 uses a built\-in
551 .BR whatnow ,
552 it does not actually run the
553 .B whatnow
554 program.
555 Hence, if you define your own
556 .IR whatnowproc ,
557 don't call it
558 .B whatnow
559 since
560 .B repl
561 won't run it.
562 .PP
563 If your current working directory is not writable, the link named
564 \*(lq@\*(rq is not available.