# repl(1) - man - phpman

[REPL(1mh)](https://www.chedong.com/phpMan.php/man/REPL/1mh/markdown)                                                                                  [REPL(1mh)](https://www.chedong.com/phpMan.php/man/REPL/1mh/markdown)



## NAME
       repl - reply to an nmh message

## SYNOPSIS
       **repl** [**-help**] [**-version**] [_+folder_] [_msg_] [**-annotate** | **-noannotate**] [**-group** | **-nogroup**] [**-cc**
            all/to/cc/me] [**-nocc** all/to/cc/me] [**-query** | **-noquery**] [**-form** _formfile_] [**-format** | **-no**‐‐
            **format**] [**-filter** _filterfile_] [**-inplace** | **-noinplace**] [**-mime** | **-nomime**] [**-fcc** _+folder_]
            [**-width** _columns_] [**-draftfolder** _+folder_] [**-draftmessage** _msg_] [**-nodraftfolder**] [**-editor**
            _editor_] [**-noedit**] [**-convertargs** _type_ _argstring_] [**-whatnowproc** _program_] [**-nowhatnowproc**]
            [**-atfile**] [**-noatfile**] [**-fmtproc** _program_] [**-nofmtproc**] [**-build**] [**-file** _msgfile_]

## DESCRIPTION
       **repl** may be used to reply to a message.

       In its simplest form (with no arguments), **repl** will set up a message-form skeleton  in  reply
       to the current message in the current folder, and invoke the **whatnow** shell.

       **repl**  uses  a reply template to construct the draft of the reply.  A reply template is simply
       an **mhl** format file (see [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown) for details).

       If the switch **-nogroup** is given (it is on by default), then **repl** will use the standard  forms
       file  “replcomps”.   This  will construct a draft message that is intended to be sent only to
       the author of the message to which you are replying.  If a file named “replcomps”  exists  in
       the user's **nmh** directory, it will be used instead of this default forms file.

       The  default reply template “replcomps” will direct **repl** to construct the reply message draft
       as follows:

            To: <Mail-Reply-To> or <Reply-To> or <From>
            cc: <To> and <cc> and <personal address>
            Fcc: {fcc switch} or +outbox
            Subject: Re: <Subject>
            In-Reply-To: <Message-Id>
            References: <Message-Id>
            Comments: In-Reply-To <From> or <apparently from> or <Sender>
               message dated <date>
            --------

       where field names enclosed in angle brackets (< >) indicate the contents of the  named  field
       from the message to which the reply is being made.

       By default, the “cc:” field is empty.  You may selectively add addresses to this default with
       the **-cc** _type_ switch.  This switch takes an argument (_all_/_to_/_cc_/_me_) which specifies  who  gets
       added  to the default “cc:” list of the reply.  You may give this switch multiple times (with
       different arguments) if you wish to add multiple types of address.

       If the switch **-group** is given, then **repl** will use the standard forms  file  “replgroupcomps”.
       This will construct a draft message that is intended as a group or followup reply.  If a file
       named “replgroupcomps” 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 pro‐
       file.

       The default group reply template “replgroupcomps” will direct **repl**  to  construct  the  reply
       message draft as follows:

            To: <Mail-Followup-To>
            Subject: Re: <Subject>
            In-Reply-To: Message from <From> of <Date>.
                         <Message-Id>
            --------

       or if the field <Mail-Followup-To> is not available:

            To: <Mail-Reply-To> or <Reply-To> or <From>
            cc: <To> and <cc> and <personal address>
            Subject: Re: <Subject>
            In-Reply-To: Message from <From> of <Date>.
                         <Message-Id>
            --------

       By default, the “cc:” contains all the addresses shown.  You may selectively remove addresses
       from this default with the **-nocc** _type_ switch.  This switch takes an argument (  _all_/_to_/_cc_/_me_)
       which specifies who gets removed from the default “cc:” list of the reply.  You may give this
       switch multiple times (with different arguments) if you wish to remove multiple types of  ad‐
       dress.

       In any case, you may specify an alternative forms file with the switch **-form** _formfile_.

       The  **-query**  switch  modifies  the action of **-nocc** _type_ switch by interactively asking you if
       each address that normally would be placed in the “To:” and “cc:”  list  should  actually  be
       sent  a copy.  This is useful for special-purpose replies.  Note that the position of the **-cc**
       and **-nocc** switches, like all other switches which take a positive and negative form,  is  im‐
       portant.

       Lines beginning with the fields “To:”, “cc:”, and ”Bcc:” will be standardized and have dupli‐
       cate addresses removed.  In addition, the **-width** _columns_ switch will guide **repl**'s  formatting
       of these fields.

       If  the  draft already exists, **repl** will ask you as to the disposition of the draft.  A reply
       of **quit** will abort **repl**, leaving the draft intact; **replace** will replace  the  existing  draft
       with a blank skeleton; and **list** will display the draft.

       See  [_comp_(1)](https://www.chedong.com/phpMan.php/man/comp/1/markdown)  for  a description of the **-editor** and **-noedit** switches.  Note that while in the
       editor, with **-atfile** and if the current directory is writable, the message being  replied  to
       is  available  through a link named “@” (assuming the default _whatnowproc_).  In addition, the
       actual pathname of the message is stored in the environment variable **$editalt**, and the  path‐
       name  of  the  folder containing the message is stored in the environment variable **$mhfolder**.
       The creation of the “@” file is controlled via the **-atfile** and **-noatfile** options.

       The **-convertargs** switch directs **repl** to pass the arguments for _type_ to **mhbuild**.   Both  argu‐
       ments  are required; _type_ must be non-empty while _argstring_ can be empty, e.g., '' in a shell
       command line.  The **-convertargs** switch can be used multiple times.  See the Convert Interface
       section of [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown) for a description of the convert mechanism, and _/usr/share/doc/nmh/con__‐
       _trib/replaliases_ for examples of its use.

       Although **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 **repl**  should
       be  a  standard form file for **mhl**, as **repl** will invoke **mhl** to format the message to which you
       are replying.

       The switches **-noformat**, **-format**, and **-filter** _filterfile_ specify which message filter file  to
       use.

       If the switch **-noformat** is given (it is the default) and the **-filter** switch is not used, then
       the message to which you are replying is not included in the body of the draft.

       If the switch **-format** is given, then a default message filter file  is  used.   This  default
       message filter should be adequate for most users.  This default filter “_mhl.reply_” is:

            ; mhl.reply
            ;
            ; default message filter for `repl' (repl -format)
            ;
            from:nocomponent,formatfield="%(unquote(decode(friendly{text}))) writes:"
            body:component="> ",overflowtext="> ",overflowoffset=0

       which  outputs  each  line  of  the body of the message prefaced with the “>” character and a
       space.

       If a file named “_mhl.reply_” exists in the user's **nmh** directory, it will be  used  instead  of
       this  form.  You may specify an alternate message filter file with the switch **-filter** _filter__‐
       _file_.

       Other reply filters are commonly used, such as:

            :
            body:nocomponent,compwidth=9,offset=9

       which says to output a blank line, and then the body of the message  being  replied  to,  in‐
       dented by one tab stop.  Another popular format is:

            message-id:nocomponent,nonewline,\
            formatfield=“In message %{text}, ”
            from:nocomponent,formatfield=“%(decode(friendly{text})) writes:”
            body:component=“>”,overflowtext=“>”,overflowoffset=0

       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 the “>” character.

       You can also use an external format program to format the message body.  The  format  program
       is specified by the _formatproc_ profile entry, and is enabled by the “format” flag.  A message
       filter using an external format program would look like this:

            body:component=“>”,nowrap,format

       See the [_mhl_(1)](https://www.chedong.com/phpMan.php/man/mhl/1/markdown) documentation for more information.  The format program can be changed by  the
### -fmtproc -nofmtproc

       To use the MIME rules for encapsulation, specify the **-mime** switch.  This directs **repl** to gen‐
       erate an **mhbuild** composition file.  Note that **nmh** will not invoke **mhbuild** automatically;  you
       must specifically give the command

            What now? mime

       prior to sending the draft.

       If  the  **-annotate**  switch  is given, the message being replied to will be annotated with the
       lines

            Replied: date Replied: addrs

       where the address list contains one line for each addressee.  The  annotation  will  be  done
       only  if the message is sent directly from **repl**.  If the message is not sent immediately from
       **repl**, “**comp** **-use**” may be used to re-edit and send the constructed message,  but  the  annota‐
       tions won't take place.  Normally annotations are done inplace in order to preserve any links
       to the message.  You may use the **-noinplace** switch to change this.

       Although the default template specifies that a copy of the reply will be put  in  the  folder
       'outbox',  if the **-fcc** _+folder_ switch is given it will override the default value.  More than
       one folder, each preceded by **-fcc** can be named.

       In addition to the standard [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown) escapes, **repl** also recognizes  the  following  addi‐
       tional _component_ escape:

            _Escape_  _Returns_  _Description_
            fcc     string   Any folders specified with `-fcc folder'

       To avoid reiteration, **repl** strips any leading `Re: ' strings from the _subject_ component.

       The **-draftfolder** _+folder_ and **-draftmessage** _msg_ switches invoke the **nmh** draft folder facility.
       This is an advanced (and highly useful) feature.  Consult the [_mh-draft_(5)](https://www.chedong.com/phpMan.php/man/mh-draft/5/markdown) man page  for  more
       information.

       Upon  exiting  from  the  editor, **repl** will invoke the **whatnow** program.  See [_whatnow_(1)](https://www.chedong.com/phpMan.php/man/whatnow/1/markdown) for a
       discussion of available options.  The invocation of this program can be  inhibited  by  using
       the  **-nowhatnowproc**  switch.   (In  fact,  it is the **whatnow** program which starts the initial
       edit.  Hence, **-nowhatnowproc** will prevent any edit from occurring.)

       The **-build** switch is intended to be used by the Emacs mh-e  interface  to  **nmh**.   It  implies
### -nowhatnowproc
       that would normally be presented to the user for editing.  No mail is actually sent.

       The **-file** _msgfile_ switch specifies the message to be replied to as an exact  filename  rather
       than  as  an  **nmh** folder and message number.  The same caveats apply to this option as to the
### -build

## FILES
       **repl** looks for all format, filter and template files in multiple  locations:  absolute  path‐
       names are accessed directly, tilde expansion is done on usernames, and files are searched for
       in the user's _Mail_ directory as specified in their profile.  If not found there,  the  direc‐
       tory “_/etc/nmh_” is checked.

       /etc/nmh/replcomps         The standard reply template
       or <mh-dir>/replcomps      Rather than the standard template
       /etc/nmh/replgroupcomps    The standard `reply -group' template
       or <mh-dir>/replgroupcomps Rather than the standard template
       /etc/nmh/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

## PROFILE COMPONENTS
       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
       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
       whatnowproc:         Program to ask the “What now?” questions

## SEE ALSO
       [_comp_(1)](https://www.chedong.com/phpMan.php/man/comp/1/markdown), [_forw_(1)](https://www.chedong.com/phpMan.php/man/forw/1/markdown), [_mh-format_(5)](https://www.chedong.com/phpMan.php/man/mh-format/5/markdown), [_mhbuild_(1)](https://www.chedong.com/phpMan.php/man/mhbuild/1/markdown), [_send_(1)](https://www.chedong.com/phpMan.php/man/send/1/markdown), [_whatnow_(1)](https://www.chedong.com/phpMan.php/man/whatnow/1/markdown)

       _/usr/share/doc/nmh/contrib/replaliases_

## DEFAULTS
       `**+folder**' defaults to the current folder
       `**msg**' defaults to cur
       `**-nogroup**'
       `**-nocc** **all**' with `-nogroup', `-cc all' with `-group'
       `**-noannotate**'
       `**-nodraftfolder**'
       `**-noformat**'
       `**-inplace**'
       `**-nomime**'
       `**-noquery**'
       `**-noatfile**'
       `**-width** **72**'

## CONTEXT
       If  a folder is given, it will become the current folder.  The message replied to will become
       the current message.

## 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 localhost for the default, **repl** uses
       the sender's host.  Moral of the story: if you're going to include addresses in a reply  tem‐
       plate, include the host portion of the address.

       The  **-width**  _columns_  switch  is only used to do address-folding; other headers are not line-
       wrapped.

       If _whatnowproc_ is **whatnow**, then **repl** uses a built-in **whatnow**, it does not  actually  run  the
       **whatnow** program.  Hence, if you define your own _whatnowproc_, don't call it **whatnow** since **repl**
       won't run it.



nmh-1.7.1                                    2014-12-15                                    [REPL(1mh)](https://www.chedong.com/phpMan.php/man/REPL/1mh/markdown)
