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