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