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