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