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