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