1REPL(1)                     General Commands Manual                    REPL(1)
2
3
4

NAME

6       repl - reply to an nmh message
7

SYNOPSIS

9       repl [-help] [-version] [+folder] [msg] [-annotate | -noannotate]
10            [-group | -nogroup] [-cc all/to/cc/me] [-nocc all/to/cc/me]
11            [-query | -noquery] [-form formfile] [-format | -noformat] [-fil‐
12            ter filterfile] [-inplace | -noinplace] [-mime | -nomime] [-fcc
13            +folder] [-width columns] [-draftfolder +folder] [-draftmessage
14            msg] [-nodraftfolder] [-editor editor] [-noedit] [-convertargs
15            type argstring] [-whatnowproc program] [-nowhatnowproc] [-atfile]
16            [-noatfile] [-fmtproc program] [-nofmtproc] [-build] [-file msg‐
17            file]
18

DESCRIPTION

20       repl may be used to reply to a message.
21
22       In  its  simplest form (with no arguments), repl will set up a message-
23       form skeleton in reply to the current message in  the  current  folder,
24       and invoke the whatnow shell.
25
26       repl  uses a reply template to construct the draft of the reply.  A re‐
27       ply template is simply an mhl format file  (see  mh-format(5)  for  de‐
28       tails).
29
30       If  the  switch -nogroup is given (it is on by default), then repl will
31       use the standard forms file “replcomps”.  This will construct  a  draft
32       message  that  is intended to be sent only to the author of the message
33       to which you are replying.  If a file named “replcomps” exists  in  the
34       user's  nmh  directory,  it  will be used instead of this default forms
35       file.
36
37       The default reply template “replcomps” will direct  repl  to  construct
38       the reply message draft as follows:
39
40            To: <Mail-Reply-To> or <Reply-To> or <From>
41            cc: <To> and <cc> and <personal address>
42            Fcc: {fcc switch} or +outbox
43            Subject: Re: <Subject>
44            In-Reply-To: <Message-Id>
45            References: <Message-Id>
46            Comments: In-Reply-To <From> or <apparently from> or <Sender>
47               message dated <date>
48            --------
49
50       where  field  names  enclosed in angle brackets (< >) indicate the con‐
51       tents of the named field from the message to which the reply  is  being
52       made.
53
54       By  default,  the  “cc:”  field  is empty.  You may selectively add ad‐
55       dresses to this default with the -cc type switch.  This switch takes an
56       argument  (all/to/cc/me)  which specifies who gets added to the default
57       “cc:” list of the reply.  You may give this switch multiple times (with
58       different arguments) if you wish to add multiple types of address.
59
60       If  the  switch  -group is given, then repl will use the standard forms
61       file “replgroupcomps”.  This will construct a draft message that is in‐
62       tended  as a group or followup reply.  If a file named “replgroupcomps”
63       exists in the user's nmh directory, it will be used instead of this de‐
64       fault  forms file, unless you specify another forms file on the command
65       line or in your profile.
66
67       The default group reply template “replgroupcomps” will direct  repl  to
68       construct the reply message draft as follows:
69
70            To: <Mail-Followup-To>
71            Subject: Re: <Subject>
72            In-Reply-To: Message from <From> of <Date>.
73                         <Message-Id>
74            --------
75
76       or if the field <Mail-Followup-To> is not available:
77
78            To: <Mail-Reply-To> or <Reply-To> or <From>
79            cc: <To> and <cc> and <personal address>
80            Subject: Re: <Subject>
81            In-Reply-To: Message from <From> of <Date>.
82                         <Message-Id>
83            --------
84
85       By default, the “cc:” contains all the addresses shown.  You may selec‐
86       tively remove addresses from this default with the -nocc  type  switch.
87       This  switch takes an argument ( all/to/cc/me) which specifies who gets
88       removed from the default “cc:” list of the reply.  You  may  give  this
89       switch  multiple times (with different arguments) if you wish to remove
90       multiple types of address.
91
92       In any case, you may specify an alternative forms file with the  switch
93       -form formfile.
94
95       The  -query switch modifies the action of -nocc type switch by interac‐
96       tively asking you if each address that normally would be placed in  the
97       “To:”  and  “cc:”  list should actually be sent a copy.  This is useful
98       for special-purpose replies.  Note that the position  of  the  -cc  and
99       -nocc switches, like all other switches which take a positive and nega‐
100       tive form, is important.
101
102       Lines beginning with the fields “To:”, “cc:”, and ”Bcc:” will be  stan‐
103       dardized and have duplicate addresses removed.  In addition, the -width
104       columns switch will guide repl's formatting of these fields.
105
106       If the draft already exists, repl will ask you as to the disposition of
107       the  draft.  A reply of quit will abort repl, leaving the draft intact;
108       replace will replace the existing draft with a blank skeleton; and list
109       will display the draft.
110
111       See  comp(1)  for  a  description  of the -editor and -noedit switches.
112       Note that while in the editor, with -atfile and if the  current  direc‐
113       tory  is  writable, the message being replied to is available through a
114       link named “@” (assuming the default whatnowproc).   In  addition,  the
115       actual  pathname  of  the message is stored in the environment variable
116       $editalt, and the pathname of the  folder  containing  the  message  is
117       stored  in the environment variable $mhfolder.  The creation of the “@”
118       file is controlled via the -atfile and -noatfile options.
119
120       The -convertargs switch directs repl to pass the arguments for type  to
121       mhbuild.   Both  arguments  are  required; type must be non-empty while
122       argstring can be empty, e.g., '' in a shell command line.  The -conver‐
123       targs  switch  can  be  used multiple times.  See the Convert Interface
124       section of mhbuild(1) for a description of the convert  mechanism,  and
125       /usr/share/doc/nmh/contrib/replaliases for examples of its use.
126
127       Although  repl  uses a forms file to direct it how to construct the be‐
128       ginning of the draft, it uses a message filter file to direct it as  to
129       how  the  message to which you are replying should be filtered (re-for‐
130       matted) in the body of the draft.  The filter file for repl should be a
131       standard  form file for mhl, as repl will invoke mhl to format the mes‐
132       sage to which you are replying.
133
134       The switches -noformat, -format, and -filter filterfile  specify  which
135       message filter file to use.
136
137       If  the  switch  -noformat is given (it is the default) and the -filter
138       switch is not used, then the message to which you are replying  is  not
139       included in the body of the draft.
140
141       If  the  switch -format is given, then a default message filter file is
142       used.  This default message filter should be adequate for  most  users.
143       This default filter “mhl.reply” is:
144
145            ; mhl.reply
146            ;
147            ; default message filter for `repl' (repl -format)
148            ;
149            from:nocomponent,formatfield="%(unquote(decode(friendly{text}))) writes:"
150            body:component="> ",overflowtext="> ",overflowoffset=0
151
152       which  outputs  each  line of the body of the message prefaced with the
153       “>” character and a space.
154
155       If a file named “mhl.reply” exists in the user's nmh directory, it will
156       be  used  instead  of  this form.  You may specify an alternate message
157       filter file with the switch -filter filterfile.
158
159       Other reply filters are commonly used, such as:
160
161            :
162            body:nocomponent,compwidth=9,offset=9
163
164       which says to output a blank line, and then the body of the message be‐
165       ing replied to, indented by one tab stop.  Another popular format is:
166
167            message-id:nocomponent,nonewline,\
168            formatfield=“In message %{text}, ”
169            from:nocomponent,formatfield=“%(decode(friendly{text})) writes:”
170            body:component=“>”,overflowtext=“>”,overflowoffset=0
171
172       This message filter file cites the Message-ID and author of the message
173       being replied to, and then outputs each line of the body prefaced  with
174       the “>” character.
175
176       You can also use an external format program to format the message body.
177       The format program is specified by the formatproc profile entry, and is
178       enabled  by the “format” flag.  A message filter using an external for‐
179       mat program would look like this:
180
181            body:component=“>”,nowrap,format
182
183       See the mhl(1) documentation for more information.  The format  program
184       can be changed by the -fmtproc program and -nofmtproc switches.
185
186       To  use  the  MIME  rules  for encapsulation, specify the -mime switch.
187       This directs repl to generate an mhbuild composition file.   Note  that
188       nmh  will  not invoke mhbuild automatically; you must specifically give
189       the command
190
191            What now? mime
192
193       prior to sending the draft.
194
195       If the -annotate switch is given, the message being replied to will  be
196       annotated with the lines
197
198            Replied: date Replied: addrs
199
200       where the address list contains one line for each addressee.  The anno‐
201       tation will be done only if the message is sent directly from repl.  If
202       the  message is not sent immediately from repl, “comp -use” may be used
203       to re-edit and send the constructed message, but the annotations  won't
204       take place.  Normally annotations are done inplace in order to preserve
205       any links to the message.  You may use the -noinplace switch to  change
206       this.
207
208       Although  the  default template specifies that a copy of the reply will
209       be put in the folder `outbox', if the -fcc +folder switch is  given  it
210       will  override  the default value.  More than one folder, each preceded
211       by -fcc can be named.
212
213       In addition to the standard mh-format(5) escapes, repl also  recognizes
214       the following additional component escape:
215
216            Escape  Returns  Description
217            fcc     string   Any folders specified with `-fcc folder'
218
219       To  avoid  reiteration, repl strips any leading `Re: ' strings from the
220       subject component.
221
222       The -draftfolder +folder and -draftmessage msg switches invoke the  nmh
223       draft  folder  facility.   This is an advanced (and highly useful) fea‐
224       ture.  Consult mh-draft(5) for more information.
225
226       Upon exiting from the editor, repl will  invoke  the  whatnow  program.
227       See  whatnow(1)  for a discussion of available options.  The invocation
228       of this program can be inhibited by using  the  -nowhatnowproc  switch.
229       (In  fact,  it  is  the  whatnow program which starts the initial edit.
230       Hence, -nowhatnowproc will prevent any edit from occurring.)
231
232       The -build switch is intended to be used by the Emacs mh-e interface to
233       nmh.  It implies -nowhatnowproc.  It causes a file <mh-dir>/reply to be
234       created, containing the draft message that would normally be  presented
235       to the user for editing.  No mail is actually sent.
236
237       The  -file  msgfile switch specifies the message to be replied to as an
238       exact filename rather than as an nmh folder and  message  number.   The
239       same caveats apply to this option as to the -build switch.
240

FILES

242       repl  looks for all format, filter and template files in multiple loca‐
243       tions: absolute pathnames are accessed  directly,  tilde  expansion  is
244       done on usernames, and files are searched for in the user's Mail direc‐
245       tory as specified in their profile.  If not found there, the  directory
246/etc/nmh” is checked.
247
248       /etc/nmh/replcomps         The standard reply template
249       or <mh-dir>/replcomps      Rather than the standard template
250       /etc/nmh/replgroupcomps    The standard `reply -group' template
251       or <mh-dir>/replgroupcomps Rather than the standard template
252       /etc/nmh/mhl.reply         The standard message filter
253       or <mh-dir>/mhl.reply      Rather than the standard filter
254       $HOME/.mh_profile          The user profile
255       <mh-dir>/draft             The draft file
256

PROFILE COMPONENTS

258       Path:                To determine the user's nmh directory
259       Alternate-Mailboxes: To determine the user's mailboxes
260       Current-Folder:      To find the default current folder
261       Draft-Folder:        To specify the default draftfolder
262       Editor:              To override the default editor
263       Msg-Protect:         To set mode when creating a new message (draft)
264       fileproc:            Program to refile the message
265       mhlproc:             Program to filter message being replied-to
266       whatnowproc:         Program to ask the “What now?” questions
267

SEE ALSO

269       comp(1), forw(1), mh-draft(5), mh-format(5), mhbuild(1), send(1), what‐
270       now(1)
271
272       /usr/share/doc/nmh/contrib/replaliases
273

DEFAULTS

275       `+folder' defaults to the current folder
276       `msg' defaults to cur
277       `-nogroup'
278       `-nocc all' with `-nogroup', `-cc all' with `-group'
279       `-noannotate'
280       `-nodraftfolder'
281       `-noformat'
282       `-inplace'
283       `-nomime'
284       `-noquery'
285       `-noatfile'
286       `-width 72'
287

CONTEXT

289       If a folder is given, it will become the current folder.   The  message
290       replied to will become the current message.
291

BUGS

293       If any addresses occur in the reply template, addresses in the template
294       that do not contain hosts are defaulted incorrectly.  Instead of  using
295       the  localhost  for the default, repl uses the sender's host.  Moral of
296       the story: if you're going to include addresses in  a  reply  template,
297       include the host portion of the address.
298
299       The  -width  columns  switch  is only used to do address-folding; other
300       headers are not line-wrapped.
301
302       If whatnowproc is whatnow, then repl uses a built-in whatnow,  it  does
303       not  actually  run  the whatnow program.  Hence, if you define your own
304       whatnowproc, don't call it whatnow since repl won't run it.
305
306
307
308nmh-1.8                           2022-12-22                           REPL(1)
Impressum