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