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