]> diplodocus.org Git - nmh/blob - man/repl.man
Removed export of most of the variables in test/common.sh.in. The
[nmh] / man / repl.man
1 .TH REPL %manext1% "December 13, 2014" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
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 [ msg ]
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 [ \-inplace " | " \-noinplace ]
26 .RB [ \-mime " | " \-nomime ]
27 .RB [ \-fcc
28 .IR +folder ]
29 .RB [ \-width
30 .IR columns ]
31 .RB [ \-draftfolder
32 .IR +folder ]
33 .RB [ \-draftmessage
34 .IR msg ]
35 .RB [ \-nodraftfolder ]
36 .RB [ \-editor
37 .IR editor ]
38 .RB [ \-noedit ]
39 .RB [ \-whatnowproc
40 .IR program ]
41 .RB [ \-nowhatnowproc ]
42 .RB [ \-atfile ]
43 .RB [ \-noatfile ]
44 .RB [ \-fmtproc
45 .IR program ]
46 .RB [ \-nofmtproc ]
47 .RB [ \-build ]
48 .RB [ \-file
49 .IR msgfile ]
50 .RB [ \-version ]
51 .RB [ \-help ]
52 .ad
53 .SH DESCRIPTION
54 .B Repl
55 may be used to produce a reply to an existing message.
56 .PP
57 In its simplest form (with no arguments),
58 .B repl
59 will set up a
60 message\-form skeleton in reply to the current message in the current
61 folder, and invoke the whatnow shell.
62 .PP
63 In order to construct the message draft of the reply,
64 .B repl
65 uses
66 a reply template to guide its actions. A reply template is simply a
67 .B mhl
68 format file (see
69 .IR mh\-format (5)
70 for details).
71 .PP
72 If the switch
73 .B \-nogroup
74 is given (it is on by default), then
75 .B repl
76 will use the standard forms file \*(lqreplcomps\*(rq. This will construct
77 a draft message that is intended to be sent only to the author of the
78 message to which you are replying. If a file named \*(lqreplcomps\*(rq
79 exists in the user's
80 .B nmh
81 directory, it will be used instead of this
82 default forms file.
83 .PP
84 The default reply template \*(lqreplcomps\*(rq will direct
85 .B repl
86 to construct the reply message draft as follows:
87 .PP
88 .RS 5
89 .nf
90 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
91 cc: <To> and <cc> and <personal address>
92 Fcc: {fcc switch} or +outbox
93 Subject: Re: <Subject>
94 In\-Reply\-To: <Message\-Id>
95 References: <Message\-Id>
96 Comments: In\-Reply\-To <From> or <apparently from> or <Sender>
97 .ti +3
98 message dated <date>
99 --------
100 .fi
101 .RE
102 .PP
103 where field names enclosed in angle brackets (<\ >) indicate the
104 contents of the named field from the message to which the reply is
105 being made.
106 .PP
107 By default, the \*(lqcc:\*(rq field is empty. You may selectively add
108 addresses to this default with the
109 .B \-cc
110 .I type
111 switch. This switch takes an
112 argument
113 .RI ( all / to / cc / me )
114 which specifies who gets added to the default
115 \*(lqcc:\*(rq list of the reply. You may give this switch multiple times (with
116 different arguments) if you wish to add multiple types of addresses.
117 .PP
118 If the switch
119 .B \-group
120 is given, then
121 .B repl
122 will use the
123 standard forms file \*(lqreplgroupcomps\*(rq. This will construct a
124 draft message that is intended as a group or followup reply. If a file
125 named \*(lqreplgroupcomps\*(rq exists in the user's nmh directory, it
126 will be used instead of this default forms file, unless you specify
127 another forms file on the command line or in your profile.
128 .PP
129 The default group reply template \*(lqreplgroupcomps\*(rq will direct
130 .B repl
131 to construct the reply message draft as follows:
132 .PP
133 .RS 5
134 .nf
135 To: <Mail\-Followup\-To>
136 Subject: Re: <Subject>
137 In\-Reply\-To: Message from <From> of <Date>.
138 .ti +\w'In\-Reply\-To: 'u
139 <Message\-Id>
140 --------
141 .fi
142 .RE
143 .PP
144 or if the field <Mail\-Followup\-To> is not available:
145 .PP
146 .RS 5
147 .nf
148 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
149 cc: <To> and <cc> and <personal address>
150 Subject: Re: <Subject>
151 In\-Reply\-To: Message from <From> of <Date>.
152 .ti +\w'In\-Reply\-To: 'u
153 <Message\-Id>
154 --------
155 .fi
156 .RE
157 .PP
158 By default, the \*(lqcc:\*(rq contains all the addresses shown. You may
159 selectively remove addresses from this default with the
160 .B \-nocc
161 .I type
162 switch.
163 This switch takes an argument (
164 .IR all / to / cc / me )
165 which specifies who gets removed
166 from the default \*(lqcc:\*(rq list of the reply. You may give this switch
167 multiple times (with different arguments) if you wish to remove multiple types
168 of addresses.
169 .PP
170 In any case, you may specify an alternate forms file with the switch
171 .B \-form
172 .IR formfile .
173 .PP
174 The
175 .B \-query
176 switch modifies the action of
177 .B \-nocc
178 .I type
179 switch by
180 interactively asking you if each address that normally would be placed in
181 the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
182 This is useful for special\-purpose replies. Note that the position of
183 the
184 .B \-cc
185 and
186 .B \-nocc
187 switches, like all other switches which take a
188 positive and negative form, is important.
189 .PP
190 Lines beginning with the fields \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
191 \*(rqBcc:\*(rq will be standardized and have duplicate addresses removed.
192 In addition, the
193 .B \-width
194 .I columns
195 switch will guide
196 .BR repl 's
197 formatting of these fields.
198 .PP
199 If the draft already exists,
200 .B repl
201 will ask you as to the disposition
202 of the draft. A reply of
203 .B quit
204 will abort
205 .BR repl ,
206 leaving the
207 draft intact;
208 .B replace
209 will replace the existing draft with a blank
210 skeleton; and
211 .B list
212 will display the draft.
213 .PP
214 See
215 .IR comp (1)
216 for a description of the
217 .B \-editor
218 and
219 .B \-noedit
220 switches. Note that while in the editor, with
221 .B \-atfile
222 and if the current directory is writable, the message being replied
223 to is available through a link named \*(lq@\*(rq (assuming the default
224 .IR whatnowproc ).
225 In addition, the actual pathname of the message is
226 stored in the environment variable
227 .BR $editalt ,
228 and the pathname of
229 the folder containing the message is stored in the environment variable
230 .BR $mhfolder .
231 The creation of the \*(lq@\*(rq file is controlled via the
232 .B \-atfile
233 and
234 .B \-noatfile
235 options.
236 .PP
237 Although
238 .B repl
239 uses a forms file to direct it how to construct
240 the beginning of the draft, it uses a message filter file to direct
241 it as to how the message to which you are replying should be filtered
242 (re\-formatted) in the body of the draft. The filter file for
243 .B repl
244 should be a standard form file for
245 .BR mhl ,
246 as
247 .B repl
248 will invoke
249 .B mhl
250 to format the message to which you are replying.
251 .PP
252 The switches
253 .BR \-noformat ,
254 .BR \-format ,
255 and
256 .B \-filter
257 .I filterfile
258 specify
259 which message filter file to use.
260 .PP
261 If the switch
262 .B \-noformat
263 is given (it is the default) and the
264 .B \-filter
265 switch is not used, then the message
266 to which you are replying is not included in the body of the draft.
267 .PP
268 If the switch
269 .B \-format
270 is given, then a default message filter file
271 is used. This default message filter should be adequate for most users.
272 This default filter
273 .RI \*(lq mhl.reply \*(rq
274 is:
275 .PP
276 .RS 5
277 .nf
278 %mhl_reply%
279 .fi
280 .RE
281 .PP
282 which outputs each line of the body of the message prefaced with the
283 \*(lq>\*(rq character and a space.
284 .PP
285 If a file named
286 .RI \*(lq mhl.reply \*(rq
287 exists in the user's
288 .B nmh
289 directory,
290 it will be used instead of this form. You may specify an alternate
291 message filter file with the switch
292 .B \-filter
293 .IR filterfile .
294 .PP
295 Other reply filters are commonly used, such as:
296 .PP
297 .RS 5
298 .nf
299 :
300 body:nocomponent,compwidth=9,offset=9
301 .fi
302 .RE
303 .PP
304 which says to output a blank line and then the body of the message
305 being replied\-to, indented by one tab\-stop. Another popular format
306 is:
307 .PP
308 .RS 5
309 .nf
310 message-id:nocomponent,\|nonewline,\\
311 formatfield=\*(lqIn message %{text},\ \*(rq
312 from:nocomponent,\|formatfield=\*(lq%(decode(friendly{text})) writes:\*(rq
313 body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
314 .fi
315 .RE
316 .PP
317 This message filter file cites the Message-ID and author of the message
318 being replied\-to, and then outputs each line of the body prefaced with
319 the \*(lq>\*(rq character.
320 .PP
321 You can also use an external format program to format the message body.
322 The format program is specified by the
323 .IR formatproc
324 profile entry, and is enabled by the \*(lqformat\*(rq flag. A message
325 filter using an external format program would look like this:
326 .PP
327 .RS 5
328 .nf
329 body:component=\*(lq>\*(rq,\|nowrap,\|format
330 .fi
331 .RE
332 .PP
333 See the
334 .IR mhl(1)
335 documentation for more information. The format program can be changed by
336 the
337 .B \-fmtproc
338 .I program
339 and
340 .B \-nofmtproc
341 switches.
342 .PP
343 To use the MIME rules for encapsulation, specify the
344 .B \-mime
345 switch.
346 This directs
347 .B repl
348 to generate an
349 .B mhbuild
350 composition file.
351 Note that
352 .B nmh
353 will not invoke
354 .B mhbuild
355 automatically; you must specifically give the command
356 .PP
357 .RS 5
358 What now? mime
359 .RE
360 .PP
361 prior to sending the draft.
362 .PP
363 If the
364 .B \-annotate
365 switch is given, the message being replied\-to will
366 be annotated with the lines
367 .PP
368 .RS 5
369 Replied:\ date
370 Replied:\ addrs
371 .RE
372 .PP
373 where the address list contains one line for each addressee.
374 The annotation will be done only if the message is sent directly from
375 .BR repl .
376 If the message is not sent immediately from
377 .BR repl ,
378 .RB \*(lq "comp\ \-use" \*(rq
379 may be used to re\-edit and send the constructed
380 message, but the annotations won't take place. Normally annotations are
381 done inplace in order to preserve any links to the message. You may use
382 the
383 .B \-noinplace
384 switch to change this.
385 .PP
386 Although the default template specifies that a copy of the reply will be
387 put in
388 the folder 'outbox',
389 if the
390 .B \-fcc
391 .I +folder
392 switch is given it will override the default value.
393 More than one folder, each preceded by
394 .B \-fcc
395 can
396 be named.
397 .PP
398 In addition to the standard
399 .IR mh\-format (5)
400 escapes,
401 .B repl
402 also recognizes the following additional
403 .I component
404 escape:
405 .PP
406 .RS 5
407 .nf
408 .ta \w'Escape 'u +\w'Returns 'u
409 .I "Escape Returns Description"
410 fcc string Any folders specified with `\-fcc\ folder'
411 .fi
412 .RE
413 .PP
414 To avoid reiteration,
415 .B repl
416 strips any leading `Re: ' strings from
417 the
418 .I subject
419 component.
420 .PP
421 The
422 .B \-draftfolder
423 .I +folder
424 and
425 .B \-draftmessage
426 .I msg
427 switches invoke
428 the
429 .B nmh
430 draft folder facility. This is an advanced (and highly
431 useful) feature. Consult the
432 .IR mh-draft (5)
433 man page for more
434 information.
435 .PP
436 Upon exiting from the editor,
437 .B repl
438 will invoke the
439 .B whatnow
440 program. See
441 .IR whatnow (1)
442 for a discussion of available
443 options. The invocation of this program can be inhibited by using the
444 .B \-nowhatnowproc
445 switch. (In truth of fact, it is the
446 .B whatnow
447 program which starts the initial edit. Hence,
448 .B \-nowhatnowproc
449 will
450 prevent any edit from occurring.)
451 .PP
452 The
453 .B \-build
454 switch is intended to be used by the Emacs mh-e interface
455 to
456 .BR nmh .
457 It implies
458 .BR \-nowhatnowproc .
459 It causes a file
460 .I <mh\-dir>/reply
461 to be created, containing the draft message that would normally be presented
462 to the user for editing.
463 No mail is actually sent.
464 .PP
465 The
466 .B \-file
467 .I msgfile
468 switch specifies the message to be replied to as an
469 exact filename rather than as an
470 .B nmh
471 folder and message number.
472 The same caveats apply to this option as to the
473 .B \-build
474 switch.
475 .SH FILES
476 .B repl
477 looks for all format, filter and template files in multiple locations:
478 absolute pathnames are accessed directly, tilde expansion is done on
479 usernames, and files are searched for in the user's
480 .I Mail
481 directory as specified in their profile. If not found there, the directory
482 .RI \*(lq %nmhetcdir% \*(rq
483 is checked.
484 .PP
485 .fc ^ ~
486 .nf
487 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
488 ^%nmhetcdir%/replcomps~^The standard reply template
489 ^or <mh\-dir>/replcomps~^Rather than the standard template
490 ^%nmhetcdir%/replgroupcomps~^The standard `reply -group' template
491 ^or <mh\-dir>/replgroupcomps~^Rather than the standard template
492 ^%nmhetcdir%/mhl.reply~^The standard message filter
493 ^or <mh\-dir>/mhl.reply~^Rather than the standard filter
494 ^$HOME/\&.mh\(ruprofile~^The user profile
495 ^<mh\-dir>/draft~^The draft file
496 .fi
497 .SH "PROFILE COMPONENTS"
498 .fc ^ ~
499 .nf
500 .ta 2.4i
501 .ta \w'ExtraBigProfileName 'u
502 ^Path:~^To determine the user's nmh directory
503 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
504 ^Current\-Folder:~^To find the default current folder
505 ^Draft\-Folder:~^To find the default draft\-folder
506 ^Editor:~^To override the default editor
507 ^Msg\-Protect:~^To set mode when creating a new message (draft)
508 ^fileproc:~^Program to refile the message
509 ^mhlproc:~^Program to filter message being replied\-to
510 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
511 .fi
512 .SH "SEE ALSO"
513 .IR comp (1),
514 .IR forw (1),
515 .IR mhbuild (1),
516 .IR send (1),
517 .IR whatnow (1),
518 .IR mh\-format (5)
519 .SH DEFAULTS
520 .nf
521 .RB ` +folder "' defaults to the current folder"
522 .RB ` msg "' defaults to cur"
523 .RB ` \-nogroup '
524 .RB ` "\-nocc\ all" "' with `\-nogroup', `\-cc\ all' with `\-group'"
525 .RB ` \-noannotate '
526 .RB ` \-nodraftfolder '
527 .RB ` \-noformat '
528 .RB ` \-inplace '
529 .RB ` \-nomime '
530 .RB ` \-noquery '
531 .RB ` \-noatfile '
532 .RB ` "\-width\ 72" '
533 .fi
534 .SH CONTEXT
535 If a folder is given, it will become the current folder. The message
536 replied\-to will become the current message.
537 .SH BUGS
538 If any addresses occur in the reply template, addresses in the template
539 that do not contain hosts are defaulted incorrectly. Instead of using
540 the localhost for the default,
541 .B repl
542 uses the sender's host.
543 Moral of the story: if you're going to include addresses in a reply
544 template, include the host portion of the address.
545 .PP
546 The
547 .B \-width
548 .I columns
549 switch is only used to do address-folding; other
550 headers are not line\-wrapped.
551 .PP
552 If
553 .I whatnowproc
554 is
555 .BR whatnow ,
556 then
557 .B repl
558 uses a built\-in
559 .BR whatnow ,
560 it does not actually run the
561 .B whatnow
562 program.
563 Hence, if you define your own
564 .IR whatnowproc ,
565 don't call it
566 .B whatnow
567 since
568 .B repl
569 won't run it.