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