cfe068fccffb08ec2d61453fdb5afb5fd41ab2c4
[mmh] / man / prompter.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH PROMPTER %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 prompter \- prompting editor front-end for nmh
8 .SH SYNOPSIS
9 .HP 5
10 .B prompter
11 .RB [ \-erase
12 .IR chr ]
13 .RB [ \-kill
14 .IR chr ]
15 .RB [ \-prepend " | " \-noprepend ]
16 .RB [ \-rapid " | " \-norapid ]
17 .RB [ \-doteof " | " \-nodoteof ]
18 .I file
19 .RB [ \-version ]
20 .RB [ \-help ]
21 .SH DESCRIPTION
22 .B Prompter
23 is an editor front\-end for
24 .B nmh
25 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 .IR file ,
30 normally provided by the
31 .B nmh
32 commands
33 .BR comp ,
34 .BR dist ,
35 .BR forw ,
36 or
37 .BR repl .
38 .PP
39 .B Prompter
40 is particularly useful when composing messages over slow
41 network or modem lines.  It is an
42 .B nmh program in that it can have
43 its own profile entry with switches, but it is not invoked directly by
44 the user.  The commands
45 .BR comp ,
46 .BR dist ,
47 .BR forw ,
48 and
49 .B repl
50 invoke
51 .B prompter as an editor, either when invoked with
52 .B \-editor
53 .IR prompter ,
54 or by the profile entry \*(lqEditor:\ prompter\*(rq,
55 or when given the command
56 .B edit
57 .B prompter
58 at the \*(lqWhat now?\*(rq prompt.
59 .PP
60 For each empty component
61 .B prompter finds in the draft, the user
62 is prompted for a response; A <RETURN> will cause the whole component
63 to be left out.  Otherwise, a `\\' preceding a <RETURN> will continue
64 the response on the next line, allowing for multiline components.
65 Continuation lines
66 .B must
67 begin with a space or tab.
68 .PP
69 Each non\-empty component is copied to the draft and displayed on the
70 terminal.
71 .PP
72 The start of the message body is denoted by a blank line or a line
73 of dashes.  If the body is non\-empty, the prompt, which isn't written
74 to the file, is
75 .PP
76 .RS 5
77 --------Enter additional text
78 .RE
79 .PP
80 or (if
81 .B \-prepend
82 was given)
83 .PP
84 .RS 5
85 --------Enter initial text
86 .RE
87 .PP
88 Message\-body typing is terminated with an end\-of\-file (usually
89 CTRL\-D).  With the
90 .B \-doteof
91 switch, a period on a line all by itself
92 also signifies end\-of\-file.  At this point control is returned to
93 the calling program, where the user is asked \*(lqWhat now?\*(rq.
94 See
95 .B whatnow (1)
96 for the valid options to this query.
97 .PP
98 By using the
99 .B \-prepend
100 switch, the user can add type\-in to the
101 beginning of the message body and have the rest of the body follow.
102 This is useful for the
103 .B forw
104 command.
105 .PP
106 By using the
107 .B \-rapid
108 switch, if the draft already contains text in
109 the message\-body, it is not displayed on the user's terminal.  This is
110 useful for low\-speed terminals.
111 .PP
112 The line editing characters for kill and erase may be specified by the
113 user via the arguments
114 .B \-kill
115 .I chr
116 and
117 .B \-erase
118 .IR chr ,
119 where
120 .I chr
121 may be a character; or `\\nnn', where \*(lqnnn\*(rq is the octal value for
122 the character.
123 .PP
124 An interrupt (usually CTRL\-C) during component typing will abort
125 .B prompter
126 and the
127 .B nmh
128 command that invoked it.  An interrupt
129 during message\-body typing is equivalent to CTRL\-D, for historical
130 reasons.  This means that
131 .B prompter
132 should finish up and exit.
133 .PP
134 The first non\-flag argument to
135 .B prompter is taken as the name of
136 the draft file, and subsequent non\-flag arguments are ignored.
137 .\" (\fIRepl\fR invokes editors with two file arguments:
138 .\" the draft file name and the replied\-to message file name.)
139
140 .SH FILES
141 .fc ^ ~
142 .nf
143 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
144 ^$HOME/\&.mh\(ruprofile~^The user profile
145 ^/tmp/prompter*~^Temporary copy of message
146 .fi
147
148 .SH "PROFILE COMPONENTS"
149 .fc ^ ~
150 .nf
151 .ta 2.4i
152 .ta \w'ExtraBigProfileName  'u
153 prompter\-next: To name the editor to be used on exit from .B prompter
154 ^Msg\-Protect:~^To set mode when creating a new draft
155 .fi
156
157 .SH "SEE ALSO"
158 comp(1), dist(1), forw(1), repl(1), whatnow(1)
159
160 .SH DEFAULTS
161 .nf
162 .RB ` \-prepend '
163 .RB ` \-norapid '
164 .RB ` \-nodoteof '
165 .fi
166
167 .SH CONTEXT
168 None
169
170 .SH "HELPFUL HINTS"
171 The
172 .B \-rapid
173 option is particularly useful with
174 .BR forw ,
175 and
176 .B \-noprepend
177 is useful with
178 .B comp
179 .BR \-use .
180 .PP
181 The user may wish to link
182 .B prompter under several names (e.g.,
183 \*(lqrapid\*(rq) and give appropriate switches in the profile entries
184 under these names (e.g., \*(lqrapid: -rapid\*(rq).  This facilitates
185 invoking prompter differently for different
186 .B nmh
187 commands (e.g.,
188 \*(lqforw: -editor rapid\*(rq).
189
190 .SH BUGS
191 .B Prompter
192 uses
193 .BR stdio (3),
194 so it will lose if you edit files with nulls in them.