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