updated ali-flist, with batch edit of others
[mmh] / man / repl.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .\" include the -mh macro file
6 .so %etcdir%/tmac.h
7 .\"
8 .TH REPL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
9 .SH NAME
10 repl \- reply to a message
11 .SH SYNOPSIS
12 .in +.5i
13 .ti -.5i
14 repl
15 \%[+folder] \%[msg]
16 .br
17 \%[\-group] \%[\-nogroup]
18 \%[\-annotate] \%[\-noannotate]
19 .br
20 \%[\-cc\ all/to/cc/me] \%[\-nocc\ all/to/cc/me]
21 .br
22 \%[\-query] \%[\-noquery]
23 \%[\-form\ formfile]
24 .br
25 \%[\-format] \%[\-noformat]
26 \%[\-filter\ filterfile]
27 .br
28 \%[\-inplace] \%[\-noinplace]
29 \%[\-mime] \%[\-nomime]
30 .br
31 \%[\-fcc\ +folder]
32 \%[\-width\ columns]
33 .br
34 \%[\-draftfolder\ +folder] \%[\-draftmessage\ msg]
35 .br
36 \%[\-nodraftfolder]
37 \%[\-editor\ editor] \%[\-noedit]
38 .br
39 \%[\-whatnowproc\ program] \%[\-nowhatnowproc]
40 .br
41 \%[\-build]
42 \%[-file msgfile]
43 .br
44 \%[\-version]
45 \%[\-help]
46 .in -.5i
47 .SH DESCRIPTION
48 \fIRepl\fR may be used to produce a reply to an existing message.
49
50 In its simplest form (with no arguments), \fIrepl\fR will set up a
51 message\-form skeleton in reply to the current message in the current
52 folder, and invoke the whatnow shell.
53
54 In order to construct the message draft of the reply, \fIrepl\fR uses
55 a reply template to guide its actions.  A reply template is simply a
56 \fImhl\fR format file (see \fImh\-format\fR\0(5) for details).
57
58 If the switch `\-nogroup' is given (it is on by default), then \fIrepl\fR
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 nmh directory, it will be used instead of this
63 default forms file.
64
65 The default reply template \*(lqreplcomps\*(rq will direct \fIrepl\fR
66 to construct the reply message draft as follows:
67
68 .nf
69 .in 1i
70 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
71 cc: <To> and <cc> and <personal address>
72 Subject: Re: <Subject>
73 In\-Reply\-To: Your message of <Date>.
74 .ti +\w'In\-Reply\-To: 'u
75 <Message\-Id>
76 .in .5i
77 .fi
78
79 where field names enclosed in angle brackets (<\ >) indicate the
80 contents of the named field from the message to which the reply is
81 being made.
82
83 By default, the \*(lqcc:\*(rq field is empty.  You may selectively add
84 addresses to this default with the `\-cc\ type' switch.  This switch takes an
85 argument (all/to/cc/me) which specifies who gets added to the default
86 \*(lqcc:\*(rq list of the reply.  You may give this switch multiple times (with
87 different arguments) if you wish to add multiple types of addresses.
88
89 If the switch `\-group' is given, then \fIrepl\fR will use the the
90 standard forms file \*(lqreplgroupcomps\*(rq.  This will construct a
91 draft message that is intended as a group or followup reply.  If a file
92 named \*(lqreplgroupcomps\*(rq exists in the user's nmh directory, it
93 will be used instead of this default forms file.
94
95 The default group reply template \*(lqreplgroupcomps\*(rq will direct
96 \fIrepl\fR to construct the reply message draft as follows:
97
98 .nf
99 .in 1i
100 To: <Mail\-Followup\-To>
101 Subject: Re: <Subject>
102 In\-Reply\-To: Message from <From> of <Date>.
103 .ti +\w'In\-Reply\-To: 'u
104 <Message\-Id>
105 .in .5i
106 .fi
107
108 or if the field <Mail\-Followup\-To> is not available:
109
110 .nf
111 .in 1i
112 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
113 cc: <To> and <cc> and <personal address>
114 Subject: Re: <Subject>
115 In\-Reply\-To: Message from <From> of <Date>.
116 .ti +\w'In\-Reply\-To: 'u
117 <Message\-Id>
118 .in .5i
119 .fi
120
121 By default, the \*(lqcc:\*(rq contains all the addresses shown.  You may
122 selectively remove addresses from this default with the `\-nocc\ type' switch.
123 This switch takes an argument (all/to/cc/me) which specifies who gets removed
124 from the default \*(lqcc:\*(rq list of the reply.  You may give this switch
125 multiple times (with different arguments) if you wish to remove multiple types
126 of addresses.
127
128 In any case, you may specify an alternate forms file with the switch
129 `\-form\ formfile'.
130
131 The `\-query' switch modifies the action of `\-nocc\ type' switch by
132 interactively asking you if each address that normally would be placed in
133 the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
134 This is useful for special\-purpose replies.  Note that the position of
135 the `\-cc' and `\-nocc' switches, like all other switches which take a
136 positive and negative form, is important.
137
138 Lines beginning with the fields \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
139 \*(rqBcc:\*(rq will be standardized and have duplicate addresses removed.
140 In addition, the `\-width\ columns' switch will guide \fIrepl\fR's
141 formatting of these fields.
142
143 If the draft already exists, \fIrepl\fR will ask you as to the disposition
144 of the draft.  A reply of \fBquit\fR will abort \fIrepl\fR, leaving the
145 draft intact; \fBreplace\fR will replace the existing draft with a blank
146 skeleton; and \fBlist\fR will display the draft.
147
148 See \fIcomp\fR\0(1) for a description of the `\-editor' and `\-noedit'
149 switches.  Note that while in the editor, the message being replied
150 to is available through a link named \*(lq@\*(rq (assuming the default
151 \fIwhatnowproc\fR\0).  In addition, the actual pathname of the message is
152 stored in the environment variable \fB$editalt\fR, and the pathname of
153 the folder containing the message is stored in the environment variable
154 \fB$mhfolder\fR.
155
156 Although \fIrepl\fR uses a forms file to direct it how to construct
157 the beginning of the draft, it uses a message filter file to direct
158 it as to how the message to which you are replying should be filtered
159 (re\-formatted) in the body of the draft.  The filter file for \fIrepl\fR
160 should be a standard form file for \fImhl\fR, as \fIrepl\fR will invoke
161 \fImhl\fR to format the message to which you are replying.
162
163 The switches `\-noformat', `\-format', and `\-filter\ filterfile' specify
164 which message filter file to use.
165
166 If the switch `\-noformat' is given (it is the default), then the message
167 to which you are replying is not included in the body of the draft.
168
169 If the switch `\-format' is given, then a default message filter file
170 is used.  This default message filter should be adequate for most users.
171 This default filter \*(lqmhl.reply\*(rq is:
172
173 .nf
174 .in +.5i
175 .ne 10
176 .eo
177 .so %etcdir%/mhl.reply
178 .ec
179 .in -.5i
180 .fi
181
182 which outputs each line of the body of the message prefaced with the
183 \*(lq>\*(rq character and a space.
184
185 If a file named \*(lqmhl.reply\*(rq exists in the user's nmh directory,
186 it will be used instead of this form.  You may specify an alternate
187 message filter file with the switch `\-filter\ filterfile'.
188
189 Other reply filters are commonly used, such as:
190
191 .nf
192 .in +.5i
193 :
194 body:nocomponent,compwidth=9,offset=9
195 .in -.5i
196 .fi
197
198 which says to output a blank line and then the body of the message
199 being replied\-to, indented by one tab\-stop.  Another popular format
200 is:
201
202 .nf
203 .in +.5i
204 .ie n \{
205 message-id:nocomponent,\|nonewline,\\
206 formatfield=\*(lqIn message %{text},\ \*(rq \}
207 .el message-id:nocomponent,\|nonewline,\|formatfield=\*(lqIn message %{text},\ \*(rq
208 from:nocomponent,\|formatfield=\*(lq%(friendly{text}) writes:\*(rq
209 body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
210 .in -.5i
211 .fi
212
213 This message filter file cites the Message-ID and author of the message
214 being replied\-to, and then outputs each line of the body prefaced with
215 the \*(lq>\*(rq character.
216
217 To use the MIME rules for encapsulation, specify the `\-mime' switch.
218 This directs \fIreply\fR to generate an \fImhbuild\fR composition file.
219 Note that nmh will not invoke \fImhbuild\fR automatically, unless you
220 add this line to your \&.mh\(ruprofile file:
221 .sp
222 .in +.5i
223 automimeproc: 1
224 .in -.5i
225 .sp
226 Otherwise, you must specifically give the command
227 .sp
228 .in +.5i
229 What now? mime
230 .in -.5i
231 .sp
232 prior to sending the draft.
233
234 If the `\-annotate' switch is given, the message being replied\-to will
235 be annotated with the lines
236
237      Replied:\ date
238      Replied:\ addrs
239
240 where the address list contains one line for each addressee.
241 The annotation will be done only if the message is sent directly from
242 \fIrepl\fR.  If the message is not sent immediately from \fIrepl\fR,
243 \*(lqcomp\ \-use\*(rq may be used to re\-edit and send the constructed
244 message, but the annotations won't take place.  Normally annotations are
245 done inplace in order to preserve any links to the message.  You may use
246 the `\-noinplace' switch to change this.
247
248 The `\-fcc\ +folder' switch can be used to automatically specify a folder
249 to receive Fcc:s.  More than one folder, each preceded by `\-fcc' can
250 be named.
251
252 In addition to the standard \fImh\-format\fR\0(5) escapes, \fIrepl\fR
253 also recognizes the following additional \fIcomponent\fR escape:
254 .sp 1
255 .nf
256 .ta \w'Escape  'u +\w'Returns  'u
257 \fIEscape\fR    \fIReturns\fR   \fIDescription\fR
258 \fIfcc\fR       string  Any folders specified with `\-fcc\ folder'
259 .re
260 .fi
261
262 To avoid reiteration, \fIrepl\fR strips any leading `Re: ' strings from
263 the \fIsubject\fR component.
264
265 The `\-draftfolder\ +folder' and `\-draftmessage\ msg' switches invoke
266 the \fInmh\fR draft folder facility.  This is an advanced (and highly
267 useful) feature.  Consult the \fImh-draft\fR(5) man page for more
268 information.
269
270 Upon exiting from the editor, \fIrepl\fR will invoke the \fIwhatnow\fR
271 program.  See \fIwhatnow\fR\0(1) for a discussion of available
272 options.  The invocation of this program can be inhibited by using the
273 `\-nowhatnowproc' switch.  (In truth of fact, it is the \fIwhatnow\fR
274 program which starts the initial edit.  Hence, `\-nowhatnowproc' will
275 prevent any edit from occurring.)
276
277 The `\-build' switch is intended to be used by the Emacs mh-e interface
278 to \fInmh\fR, and is only present if \fInmh\fR was compiled with support
279 for mh-e. It implies `\-nowhatnowproc'. It causes a file <mh\-dir>/reply
280 to be created, containing the draft message that would normally be presented
281 to the user for editing.
282 No mail is actually sent. Note that this switch is not guaranteed to
283 be present or to have the same effects in future versions of \fInmh\fR:
284 it is documented here only for completeness.
285
286 The `\-file\ msgfile' switch specifies the message to be replied to as an 
287 exact filename rather than as an \fInmh\fR folder and message number. It is 
288 intended to be used by the \fImsh\fR\0(1) interface to \fInmh\fR. 
289 The same caveats apply to this option as to the `\-build' switch.
290
291 .Fi
292 ^%etcdir%/replcomps~^The standard reply template
293 ^or <mh\-dir>/replcomps~^Rather than the standard template
294 ^%etcdir%/replgroupcomps~^The standard `reply -group' template
295 ^or <mh\-dir>/replgroupcomps~^Rather than the standard template
296 ^%etcdir%/mhl.reply~^The standard message filter
297 ^or <mh\-dir>/mhl.reply~^Rather than the standard filter
298 ^$HOME/\&.mh\(ruprofile~^The user profile
299 ^<mh\-dir>/draft~^The draft file
300 .Pr
301 ^Path:~^To determine the user's nmh directory
302 .Ps
303 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
304 .Ps
305 ^Current\-Folder:~^To find the default current folder
306 .Ps
307 ^Draft\-Folder:~^To find the default draft\-folder
308 .Ps
309 ^Editor:~^To override the default editor
310 .Ps
311 ^Msg\-Protect:~^To set mode when creating a new message (draft)
312 .Ps
313 ^fileproc:~^Program to refile the message
314 .Ps
315 ^mhlproc:~^Program to filter message being replied\-to
316 .Ps
317 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
318 .Sa
319 mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5)
320 .De
321 `+folder' defaults to the current folder
322 .Ds
323 `msg' defaults to cur
324 .Ds
325 `\-nogroup'
326 .Ds
327 `\-nocc\ all' with `\-nogroup', `\-cc\ all' with `\-group'
328 .Ds
329 `\-noannotate'
330 .Ds
331 `\-nodraftfolder'
332 .Ds
333 `\-noformat'
334 .Ds
335 `\-inplace'
336 .Ds
337 `\-nomime'
338 .Ds
339 `\-noquery'
340 .Ds
341 `\-width\ 72'
342 .Co
343 If a folder is given, it will become the current folder.  The message
344 replied\-to will become the current message.
345 .Bu
346 If any addresses occur in the reply template, addresses in the template
347 that do not contain hosts are defaulted incorrectly.  Instead of using
348 the localhost for the default, \fIrepl\fR uses the sender's host.
349 Moral of the story: if you're going to include addresses in a reply
350 template, include the host portion of the address.
351
352 The `\-width columns' switch is only used to do address-folding; other
353 headers are not line\-wrapped.
354
355 If \fIwhatnowproc\fR is \fIwhatnow\fR, then \fIrepl\fR uses a built\-in
356 \fIwhatnow\fR, it does not actually run the \fIwhatnow\fR program.
357 Hence, if you define your own \fIwhatnowproc\fR, don't call it
358 \fIwhatnow\fR since \fIrepl\fR won't run it.
359
360 If your current working directory is not writable, the link named
361 \*(lq@\*(rq is not available.
362 .En