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