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