SYNOPSIS formating to prevent filling
[mmh] / man / whatnow.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH WHATNOW %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 whatnow \- prompting front-end for sending messages
8 .SH SYNOPSIS
9 .HP 5
10 .na
11 .B whatnow
12 .RB [ \-draftfolder
13 .IR +folder ]
14 .RB [ \-draftmessage
15 .IR msg ]
16 .RB [ \-nodraftfolder ]
17 .RB [ \-editor
18 .IR editor ]
19 .RB [ \-noedit ]
20 .RB [ \-prompt
21 .IR string ]
22 .RI [ file ]
23 .RB [ \-version ]
24 .RB [ \-help ]
25 .ad
26 .SH DESCRIPTION
27 .B Whatnow
28 is the default program that queries the user about
29 the disposition of a composed draft.  It is normally automatically
30 invoked by one of the
31 .B nmh
32 commands
33 .BR comp ,
34 .BR dist ,
35 .BR forw ,
36 or
37 .B repl
38 after the initial edit.
39 .PP
40 When started, the editor is started on the draft (unless
41 .B \-noedit
42 is given, in which case the initial edit is suppressed).  Then,
43 .B whatnow
44 repetitively prompts the user with \*(lqWhat now?\*(rq
45 and awaits a response.  The valid responses are:
46 .PP
47 .RS 5
48 .TP \w'refilezzfolderz'u
49 .B edit
50 re\-edit using the same editor that was used on the
51 preceding round unless a profile entry
52 \*(lq<lasteditor>\-next: <editor>\*(rq names an alternate editor
53 .TP \w'refilezzfolderz'u
54 .B edit <editor>
55 invoke <editor> for further editing
56 .TP \w'refilezzfolderz'u
57 .B refile +folder
58 refile the draft into the given folder
59 .TP \w'refilezzfolderz'u
60 .B mime
61 process the draft as MIME composition file using
62 the
63 .I buildmimeproc
64 command
65 .RB ( mhbuild
66 by default)
67 .TP \w'refilezzfolderz'u
68 .B display
69 list the message being distributed/replied\-to
70 on the terminal
71 .TP \w'refilezzfolderz'u
72 .B list
73 list the draft on the terminal
74 .TP \w'refilezzfolderz'u
75 .B send
76 send the message
77 .TP \w'refilezzfolderz'u
78 .B send \-watch
79 send the message and monitor the delivery process
80 .TP \w'refilezzfolderz'u
81 .B push
82 send the message in the background
83 .TP \w'refilezzfolderz'u
84 .B whom
85 list the addresses that the message will go to
86 .TP \w'refilezzfolderz'u
87 .B whom \-check
88 list the addresses and verify that they are
89 acceptable to the transport service
90 .TP \w'refilezzfolderz'u
91 .B quit
92 preserve the draft and exit
93 .TP \w'refilezzfolderz'u
94 .B quit \-delete
95 delete the draft and exit
96 .TP \w'refilezzfolderz'u
97 .B delete
98 delete the draft and exit
99 .RE
100 .PP
101 When entering your response, you need only type enough characters
102 to uniquely identify the response.
103 .PP
104 For the
105 .B edit
106 response, any valid switch to the editor is valid.
107 .PP
108 For the
109 .B send
110 and
111 .B push
112 responses, any valid switch to
113 .BR send (1)
114 is valid (as
115 .B push
116 merely invokes
117 .B send
118 with the
119 .B \-push
120 option).
121 .PP
122 For the
123 .B whom
124 response, any valid switch to
125 .BR whom (1)
126 is valid.
127 .PP
128 For the
129 .B refile
130 response, any valid switch to the
131 .I fileproc
132 is valid.
133 .PP
134 For the
135 .B display
136 and
137 .B list
138 responses, any valid argument to
139 the
140 .I lproc
141 is valid.  If any non\-switch arguments are present, then
142 the pathname of the draft will be excluded from the argument list given
143 to the
144 .I lproc
145 (this is useful for listing another
146 .B nmh
147 message).
148 .PP
149 See
150 .BR mh\-profile (5)
151 for further information about how editors
152 are used by
153 .BR nmh .
154 It also discusses how environment variables can be
155 used to direct
156 .BR whatnow 's
157 actions in complex ways.
158 .PP
159 The
160 .B \-prompt
161 .I string
162 switch sets the prompting string for
163 .BR whatnow .
164 .PP
165 The
166 .B \-draftfolder
167 .I +folder
168 and
169 .B \-draftmessage
170 .I msg
171 switches invoke
172 the
173 .B nmh
174 draft folder facility.  This is an advanced (and highly
175 useful) feature.  Consult the
176 .BR mh-draft (5)
177 man page for more
178 information.
179
180 .SH FILES
181 .fc ^ ~
182 .nf
183 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
184 ^$HOME/\&.mh\(ruprofile~^The user profile
185 ^<mh\-dir>/draft~^The draft file
186 .fi
187
188 .SH "PROFILE COMPONENTS"
189 .fc ^ ~
190 .nf
191 .ta 2.4i
192 .ta \w'ExtraBigProfileName  'u
193 ^Path:~^To determine the user's nmh directory
194 ^Draft\-Folder:~^To find the default draft\-folder
195 ^Editor:~^To override the default editor
196 ^<lasteditor>\-next:~^To name an editor to be used after exit
197 ^~^from <lasteditor>
198 ^automimeproc:~^If value is 1, and the draft is a MIME
199 ^~^composition file, then automatically call
200 ^~^buildmimeproc prior to sending.
201 ^buildmimeproc:~^Program to translate MIME composition files
202 ^fileproc:~^Program to refile the message
203 ^lproc:~^Program to list the contents of a message
204 ^sendproc:~^Program to use to send the message
205 ^whomproc:~^Program to determine who a message would go to
206 .fi
207
208 .SH "SEE ALSO"
209 send(1), whom(1)
210
211 .SH DEFAULTS
212 .nf
213 .RB ` \-prompt "' defaults to \*(lqWhat\ Now?\ \*(rq"
214 .fi
215
216 .SH CONTEXT
217 None
218
219 .SH BUGS
220 The argument to the
221 .B \-prompt
222 switch must be interpreted as a single
223 token by the shell that invokes
224 .BR whatnow .
225 Therefore, one must
226 usually place the argument to this switch inside double\-quotes.
227 .PP
228 If the initial edit fails,
229 .B whatnow
230 deletes your draft (by renaming
231 it with a leading comma); failure of a later edit preserves the draft.
232 .PP
233 If the
234 .I buildmimeproc
235 fails (returns a nonzero status),
236 .B whatnow
237 simply prints a \*(lqWhat now?\*(rq prompt.
238 .B whatnow
239 depends on the
240 .I buildmimeproc
241 to tell the user that something went wrong.
242 .PP
243 If
244 .I whatnowproc
245 is
246 .BR whatnow ,
247 then
248 .BR comp ,
249 .BR dist ,
250 .BR forw ,
251 and
252 .B repl
253 use a built\-in
254 .BR whatnow ,
255 and do not actually run the
256 .B whatnow
257 program.  Hence, if you define your own
258 .IR whatnowproc ,
259 don't call it
260 .B whatnow
261 since it won't be run.
262 .PP
263 If
264 .I sendproc
265 is
266 .BR send ,
267 then
268 .B whatnow
269 uses a built\-in
270 .BR send ,
271 it does not actually run the
272 .B send
273 program.  Hence, if
274 you define your own
275 .IR sendproc ,
276 don't call it
277 .B send
278 since
279 .B whatnow
280 won't run it.