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