-.\"
+.TH REPL %manext1% 2014-12-15 "%nmhversion%"
+.
.\" %nmhwarning%
-.\"
-.TH REPL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
+.
.SH NAME
-repl \- reply to a message
+repl \- reply to an nmh message
.SH SYNOPSIS
.HP 5
.na
.B repl
+.RB [ \-help ]
+.RB [ \-version ]
.RI [ +folder ]
-.RI [ msgs ]
-.RB [ \-annotate " | " \-noannotate ]
+.RI [ msg ]
+.RB [ \-annotate " | " \-noannotate ]
.RB [ \-group " | " \-nogroup ]
.RB [ \-cc
all/to/cc/me]
.RB [ \-editor
.IR editor ]
.RB [ \-noedit ]
+.RB [ \-convertargs
+.IR "type argstring" ]
.RB [ \-whatnowproc
.IR program ]
.RB [ \-nowhatnowproc ]
+.RB [ \-atfile ]
+.RB [ \-noatfile ]
+.RB [ \-fmtproc
+.IR program ]
+.RB [ \-nofmtproc ]
.RB [ \-build ]
.RB [ \-file
.IR msgfile ]
-.RB [ \-version ]
-.RB [ \-help ]
.ad
.SH DESCRIPTION
-.B Repl
-may be used to produce a reply to an existing message.
+.B repl
+may be used to reply to a message.
.PP
In its simplest form (with no arguments),
.B repl
-will set up a
-message\-form skeleton in reply to the current message in the current
-folder, and invoke the whatnow shell.
+will set up a message-form skeleton in reply to the current message
+in the current folder, and invoke the
+.B whatnow
+shell.
.PP
-In order to construct the message draft of the reply,
.B repl
-uses
-a reply template to guide its actions. A reply template is simply a
+uses a reply template to construct the draft of the reply.
+A reply template is simply an
.B mhl
format file (see
-.BR mh\-format (5)
+.IR mh\-format (5)
for details).
.PP
If the switch
message to which you are replying. If a file named \*(lqreplcomps\*(rq
exists in the user's
.B nmh
-directory, it will be used instead of this
-default forms file.
+directory, it will be used instead of this default forms file.
.PP
The default reply template \*(lqreplcomps\*(rq will direct
.B repl
In\-Reply\-To: <Message\-Id>
References: <Message\-Id>
Comments: In\-Reply\-To <From> or <apparently from> or <Sender>
-.ti +3
+.ti +3
message dated <date>
--------
.fi
addresses to this default with the
.B \-cc
.I type
-switch. This switch takes an
-argument (
-.IR all / to / cc / me )
+switch. This switch takes an argument
+.RI ( all / to / cc / me )
which specifies who gets added to the default
\*(lqcc:\*(rq list of the reply. You may give this switch multiple times (with
-different arguments) if you wish to add multiple types of addresses.
+different arguments) if you wish to add multiple types of address.
.PP
If the switch
.B \-group
is given, then
.B repl
-will use the the
-standard forms file \*(lqreplgroupcomps\*(rq. This will construct a
-draft message that is intended as a group or followup reply. If a file
-named \*(lqreplgroupcomps\*(rq exists in the user's nmh directory, it
-will be used instead of this default forms file.
+will use the standard forms file \*(lqreplgroupcomps\*(rq.
+This will construct a draft message that is intended as a group or
+followup reply. If a file named \*(lqreplgroupcomps\*(rq exists
+in the user's nmh directory, it will be used instead of this default
+forms file, unless you specify another forms file on the command line
+or in your profile.
.PP
The default group reply template \*(lqreplgroupcomps\*(rq will direct
.B repl
switch.
This switch takes an argument (
.IR all / to / cc / me )
-which specifies who gets removed
-from the default \*(lqcc:\*(rq list of the reply. You may give this switch
-multiple times (with different arguments) if you wish to remove multiple types
-of addresses.
+which specifies who gets removed from the default \*(lqcc:\*(rq list of
+the reply. You may give this switch multiple times (with different arguments)
+if you wish to remove multiple types of address.
.PP
-In any case, you may specify an alternate forms file with the switch
+In any case, you may specify an alternative forms file with the switch
.B \-form
.IR formfile .
.PP
switch modifies the action of
.B \-nocc
.I type
-switch by
-interactively asking you if each address that normally would be placed in
-the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
-This is useful for special\-purpose replies. Note that the position of
+switch by interactively asking you if each address that normally would be
+placed in the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
+This is useful for special-purpose replies. Note that the position of
the
.B \-cc
and
.B \-nocc
-switches, like all other switches which take a
-positive and negative form, is important.
+switches, like all other switches which take a positive and negative form,
+is important.
.PP
Lines beginning with the fields \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
\*(rqBcc:\*(rq will be standardized and have duplicate addresses removed.
.PP
If the draft already exists,
.B repl
-will ask you as to the disposition
-of the draft. A reply of
+will ask you as to the disposition of the draft. A reply of
.B quit
will abort
.BR repl ,
leaving the
draft intact;
.B replace
-will replace the existing draft with a blank
-skeleton; and
+will replace the existing draft with a blank skeleton; and
.B list
will display the draft.
.PP
See
-.BR comp (1)
+.IR comp (1)
for a description of the
.B \-editor
and
.B \-noedit
-switches. Note that while in the editor, the message being replied
+switches. Note that while in the editor, with
+.B \-atfile
+and if the current directory is writable, the message being replied
to is available through a link named \*(lq@\*(rq (assuming the default
.IR whatnowproc ).
-In addition, the actual pathname of the message is
-stored in the environment variable
+In addition, the actual pathname of the message is stored in the
+environment variable
.BR $editalt ,
-and the pathname of
-the folder containing the message is stored in the environment variable
+and the pathname of the folder containing the message is stored in
+the environment variable
.BR $mhfolder .
+The creation of the \*(lq@\*(rq file is controlled via the
+.B \-atfile
+and
+.B \-noatfile
+options.
+.PP
+The
+.B \-convertargs
+switch directs
+.B repl
+to pass the arguments for
+.I type
+to
+.BR mhbuild .
+Both arguments are required;
+.I type
+must be non-empty while
+.I argstring
+can be empty, e.g., '' in a shell command line. The
+.B \-convertargs
+switch can be used multiple times.
+See the Convert Interface section of
+.IR mhbuild (1)
+for a description of the convert mechanism, and
+.I %docdir%/contrib/replaliases
+for examples of its use.
.PP
Although
.B repl
-uses a forms file to direct it how to construct
-the beginning of the draft, it uses a message filter file to direct
-it as to how the message to which you are replying should be filtered
-(re\-formatted) in the body of the draft. The filter file for
+uses a forms file to direct it how to construct the beginning of the
+draft, it uses a message filter file to direct it as to how the message
+to which you are replying should be filtered (re-formatted) in the body
+of the draft. The filter file for
.B repl
should be a standard form file for
.BR mhl ,
and
.B \-filter
.I filterfile
-specify
-which message filter file to use.
+specify which message filter file to use.
.PP
If the switch
.B \-noformat
-is given (it is the default), then the message
-to which you are replying is not included in the body of the draft.
+is given (it is the default) and the
+.B \-filter
+switch is not used, then the message to which you are replying is not
+included in the body of the draft.
.PP
If the switch
.B \-format
-is given, then a default message filter file
-is used. This default message filter should be adequate for most users.
+is given, then a default message filter file is used.
+This default message filter should be adequate for most users.
This default filter
.RI \*(lq mhl.reply \*(rq
is:
.fi
.RE
.PP
-which says to output a blank line and then the body of the message
-being replied\-to, indented by one tab\-stop. Another popular format
+which says to output a blank line, and then the body of the message
+being replied to, indented by one tab stop. Another popular format
is:
.PP
.RS 5
.RE
.PP
This message filter file cites the Message-ID and author of the message
-being replied\-to, and then outputs each line of the body prefaced with
+being replied to, and then outputs each line of the body prefaced with
the \*(lq>\*(rq character.
.PP
You can also use an external format program to format the message body.
.RE
.PP
See the
-.BR mhl(1)
+.IR mhl (1)
documentation for more information.
+The format program can be changed by the
+.B \-fmtproc
+.I program
+and
+.B \-nofmtproc
+switches.
.PP
To use the MIME rules for encapsulation, specify the
.B \-mime
.B nmh
will not invoke
.B mhbuild
-automatically, unless you
-add this line to your
-.I \&.mh\(ruprofile
-file:
-.PP
-.RS 5
-automimeproc: 1
-.RE
-.PP
-Otherwise, you must specifically give the command
+automatically; you must specifically give the command
.PP
.RS 5
What now? mime
.PP
If the
.B \-annotate
-switch is given, the message being replied\-to will
-be annotated with the lines
+switch is given, the message being replied to will be annotated with
+the lines
.PP
.RS 5
Replied:\ date
If the message is not sent immediately from
.BR repl ,
.RB \*(lq "comp\ \-use" \*(rq
-may be used to re\-edit and send the constructed
-message, but the annotations won't take place. Normally annotations are
-done inplace in order to preserve any links to the message. You may use
-the
+may be used to re-edit and send the constructed message, but the
+annotations won't take place.
+Normally annotations are done inplace in order to preserve any links
+to the message.
+You may use the
.B \-noinplace
switch to change this.
.PP
Although the default template specifies that a copy of the reply will be
-put in
-the folder 'outbox',
-if the
+put in the folder 'outbox', if the
.B \-fcc
.I +folder
switch is given it will override the default value.
More than one folder, each preceded by
.B \-fcc
-can
-be named.
+can be named.
.PP
In addition to the standard
-.BR mh\-format (5)
+.IR mh\-format (5)
escapes,
.B repl
also recognizes the following additional
.RS 5
.nf
.ta \w'Escape 'u +\w'Returns 'u
-.I Escape Returns Description
+.I "Escape Returns Description"
fcc string Any folders specified with `\-fcc\ folder'
.fi
.RE
.PP
To avoid reiteration,
.B repl
-strips any leading `Re: ' strings from
-the
+strips any leading `Re: ' strings from the
.I subject
component.
.PP
and
.B \-draftmessage
.I msg
-switches invoke
-the
+switches invoke the
.B nmh
-draft folder facility. This is an advanced (and highly
-useful) feature. Consult the
-.BR mh-draft (5)
-man page for more
-information.
+draft folder facility. This is an advanced (and highly useful) feature.
+Consult the
+.IR mh-draft (5)
+man page for more information.
.PP
Upon exiting from the editor,
.B repl
will invoke the
.B whatnow
program. See
-.BR whatnow (1)
+.IR whatnow (1)
for a discussion of available
options. The invocation of this program can be inhibited by using the
.B \-nowhatnowproc
-switch. (In truth of fact, it is the
+switch. (In fact, it is the
.B whatnow
program which starts the initial edit. Hence,
.B \-nowhatnowproc
-will
-prevent any edit from occurring.)
+will prevent any edit from occurring.)
.PP
The
.B \-build
It implies
.BR \-nowhatnowproc .
It causes a file
-.I <mh\-dir>/reply
+.I <mh-dir>/reply
to be created, containing the draft message that would normally be presented
to the user for editing.
No mail is actually sent.
The
.B \-file
.I msgfile
-switch specifies the message to be replied to as an
-exact filename rather than as an
+switch specifies the message to be replied to as an exact filename rather
+than as an
.B nmh
-folder and message number. It is
-intended to be used by the
-.B msh
-interface to
-.BR nmh .
+folder and message number.
The same caveats apply to this option as to the
.B \-build
switch.
-
.SH FILES
+.B repl
+looks for all format, filter and template files in multiple locations:
+absolute pathnames are accessed directly, tilde expansion is done on
+usernames, and files are searched for in the user's
+.I Mail
+directory as specified in their profile. If not found there, the directory
+.RI \*(lq %nmhetcdir% \*(rq
+is checked.
+.PP
.fc ^ ~
.nf
-.ta \w'%etcdir%/ExtraBigFileName 'u
-^%etcdir%/replcomps~^The standard reply template
-^or <mh\-dir>/replcomps~^Rather than the standard template
-^%etcdir%/replgroupcomps~^The standard `reply -group' template
-^or <mh\-dir>/replgroupcomps~^Rather than the standard template
-^%etcdir%/mhl.reply~^The standard message filter
-^or <mh\-dir>/mhl.reply~^Rather than the standard filter
-^$HOME/\&.mh\(ruprofile~^The user profile
-^<mh\-dir>/draft~^The draft file
+.ta \w'%nmhetcdir%/ExtraBigFileName 'u
+^%nmhetcdir%/replcomps~^The standard reply template
+^or <mh-dir>/replcomps~^Rather than the standard template
+^%nmhetcdir%/replgroupcomps~^The standard `reply -group' template
+^or <mh-dir>/replgroupcomps~^Rather than the standard template
+^%nmhetcdir%/mhl.reply~^The standard message filter
+^or <mh-dir>/mhl.reply~^Rather than the standard filter
+^$HOME/.mh_profile~^The user profile
+^<mh-dir>/draft~^The draft file
.fi
-
.SH "PROFILE COMPONENTS"
.fc ^ ~
.nf
^Path:~^To determine the user's nmh directory
^Alternate\-Mailboxes:~^To determine the user's mailboxes
^Current\-Folder:~^To find the default current folder
-^Draft\-Folder:~^To find the default draft\-folder
+^Draft\-Folder:~^To find the default draft-folder
^Editor:~^To override the default editor
^Msg\-Protect:~^To set mode when creating a new message (draft)
^fileproc:~^Program to refile the message
-^mhlproc:~^Program to filter message being replied\-to
+^mhlproc:~^Program to filter message being replied-to
^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
.fi
-
.SH "SEE ALSO"
-mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5)
-
+.IR comp (1),
+.IR forw (1),
+.IR mh\-format (5),
+.IR mhbuild (1),
+.IR send (1),
+.IR whatnow (1)
+.PP
+.I %docdir%/contrib/replaliases
.SH DEFAULTS
.nf
.RB ` +folder "' defaults to the current folder"
.RB ` \-inplace '
.RB ` \-nomime '
.RB ` \-noquery '
+.RB ` \-noatfile '
.RB ` "\-width\ 72" '
.fi
-
.SH CONTEXT
If a folder is given, it will become the current folder. The message
-replied\-to will become the current message.
-
+replied to will become the current message.
.SH BUGS
If any addresses occur in the reply template, addresses in the template
that do not contain hosts are defaulted incorrectly. Instead of using
The
.B \-width
.I columns
-switch is only used to do address-folding; other
-headers are not line\-wrapped.
+switch is only used to do address-folding; other headers are not line-wrapped.
.PP
If
.I whatnowproc
.BR whatnow ,
then
.B repl
-uses a built\-in
+uses a built-in
.BR whatnow ,
it does not actually run the
.B whatnow
since
.B repl
won't run it.
-.PP
-If your current working directory is not writable, the link named
-\*(lq@\*(rq is not available.