Initial revision
[mmh] / man / prompter.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .\" include the -mh macro file
6 .so %etcdir%/tmac.h
7 .\"
8 .TH PROMPTER %manext1% MH.6.8 [%nmhversion%]
9 .SH NAME
10 prompter \- prompting editor front-end for nmh
11 .SH SYNOPSIS
12 .in +.5i
13 .ti -.5i
14 prompter
15 \%[\-erase\ chr]
16 \%[\-kill\ chr]
17 \%[\-prepend] \%[\-noprepend]
18 \%[\-rapid] \%[\-norapid]
19 \%[\-doteof] \%[\-nodoteof]
20 file
21 \%[\-version]
22 \%[\-help]
23 .in -.5i
24 .SH DESCRIPTION
25 \fIPrompter\fR is an editor front\-end for \fInmh\fR which allows rapid
26 composition of messages.  This program is not normally invoked directly by
27 users but takes the place of an editor and acts as an editor front\-end.
28 It operates on an RFC\-822 style message draft skeleton specified by
29 file, normally provided by the nmh commands \fIcomp\fR, \fIdist\fR,
30 \fIforw\fR, or \fIrepl\fR.
31
32 \fIPrompter\fR is particularly useful when composing messages over slow
33 network or modem lines.  It is an \fInmh\fR program in that it can have
34 its own profile entry with switches, but it is not invoked directly by
35 the user.  The commands \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR
36 invoke \fIprompter\fR as an editor, either when invoked with
37 `\-editor\ prompter', or by the profile entry \*(lqEditor:\ prompter\*(rq,
38 or when given the command `edit\ prompter' at the \*(lqWhat now?\*(rq prompt.
39
40 For each empty component \fIprompter\fR finds in the draft, the user
41 is prompted for a response; A <RETURN> will cause the whole component
42 to be left out.  Otherwise, a `\\' preceding a <RETURN> will continue
43 the response on the next line, allowing for multiline components.
44 Continuation lines \fBmust\fR begin with a space or tab.
45
46 Each non\-empty component is copied to the draft and displayed on the
47 terminal.
48
49 The start of the message body is denoted by a blank line or a line
50 of dashes.  If the body is non\-empty, the prompt, which isn't written
51 to the file, is
52
53     \*(lq--------Enter additional text\*(rq,
54
55 or (if `\-prepend' was given)
56
57     \*(lq--------Enter initial text\*(rq.
58
59 Message\-body typing is terminated with an end\-of\-file (usually
60 CTRL\-D).  With the `\-doteof' switch, a period on a line all by itself
61 also signifies end\-of\-file.  At this point control is returned to
62 the calling program, where the user is asked \*(lqWhat now?\*(rq.
63 See \fIwhatnow\fR for the valid options to this query.
64
65 By using the `\-prepend' switch, the user can add type\-in to the
66 beginning of the message body and have the rest of the body follow.
67 This is useful for the \fIforw\fR command.
68
69 By using the `\-rapid' switch, if the draft already contains text in
70 the message\-body, it is not displayed on the user's terminal.  This is
71 useful for low\-speed terminals.
72
73 The line editing characters for kill and erase may be specified by the
74 user via the arguments `\-kill\ chr' and `\-erase\ chr', where chr may
75 be a character; or `\\nnn', where \*(lqnnn\*(rq is the octal value for
76 the character.
77
78 An interrupt (usually CTRL\-C) during component typing will abort
79 \fIprompter\fR and the \fInmh\fR command that invoked it.  An interrupt
80 during message\-body typing is equivalent to CTRL\-D, for historical
81 reasons.  This means that \fIprompter\fR should finish up and exit.
82
83 The first non\-flag argument to \fIprompter\fR is taken as the name of
84 the draft file, and subsequent non\-flag arguments are ignored.
85 .\" (\fIRepl\fR invokes editors with two file arguments:
86 .\" the draft file name and the replied\-to message file name.)
87 .Fi
88 ^$HOME/\&.mh\(ruprofile~^The user profile
89 ^/tmp/prompter*~^Temporary copy of message
90 .Pr
91 prompter\-next: To name the editor to be used on exit from \fIprompter\fR
92 .Ps
93 ^Msg\-Protect:~^To set mode when creating a new draft
94 .Sa
95 comp(1), dist(1), forw(1), repl(1), whatnow(1)
96 .De
97 `\-prepend'
98 .Ds
99 `\-norapid'
100 .Ds
101 `\-nodoteof'
102 .Co
103 None
104 .Hh
105 The `\-rapid' option is particularly useful with \fIforw\fP, and
106 `\-noprepend' is useful with \fIcomp\ \-use\fP.
107
108 The user may wish to link \fIprompter\fR under several names (e.g.,
109 \*(lqrapid\*(rq) and give appropriate switches in the profile entries
110 under these names (e.g., \*(lqrapid: -rapid\*(rq).  This facilitates
111 invoking prompter differently for different \fInmh\fP commands (e.g.,
112 \*(lqforw: -editor rapid\*(rq).
113 .Bu
114 \fIPrompter\fR uses \fIstdio\fR\0(3), so it will lose if you edit files
115 with nulls in them.
116 .En