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