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