Added support for optional Content_Disposition header in mhbuild directive.s
[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 .RB [ \-attach
26 .IR header-field-name ]
27 .ad
28 .SH DESCRIPTION
29 .B Whatnow
30 is the default program that queries the user about
31 the disposition of a composed draft.  It is normally automatically
32 invoked by one of the
33 .B nmh
34 commands
35 .BR comp ,
36 .BR dist ,
37 .BR forw ,
38 or
39 .B repl
40 after the initial edit.
41 .PP
42 When started, the editor is started on the draft (unless
43 .B \-noedit
44 is given, in which case the initial edit is suppressed).  Then,
45 .B whatnow
46 repetitively prompts the user with \*(lqWhat now?\*(rq
47 and awaits a response.  The valid responses are:
48 .PP
49 .RS 5
50 .TP \w'refilezzzzfolderz'u
51 .B edit
52 re\-edit using the same editor that was used on the
53 preceding round unless a profile entry
54 \*(lq<lasteditor>\-next: <editor>\*(rq names an alternate editor
55 .TP \w'refilezzzzfolderz'u
56 .B edit <editor>
57 invoke <editor> for further editing
58 .TP \w'refilezzzzfolderz'u
59 .B refile +folder
60 refile the draft into the given folder
61 .TP \w'refilezzzzfolderz'u
62 .B mime
63 process the draft as MIME composition file using
64 the
65 .I buildmimeproc
66 command
67 .RB ( mhbuild
68 by default)
69 .TP \w'refilezzzzfolderz'u
70 .B display
71 list the message being distributed/replied\-to
72 on the terminal
73 .TP \w'refilezzzzfolderz'u
74 .B list
75 list the draft on the terminal
76 .TP \w'refilezzzzfolderz'u
77 .B send
78 send the message
79 .TP \w'refilezzzzfolderz'u
80 .B send \-watch
81 send the message and monitor the delivery process
82 .TP \w'refilezzzzfolderz'u
83 .B push
84 send the message in the background
85 .TP \w'refilezzzzfolderz'u
86 .B whom
87 list the addresses that the message will go to
88 .TP \w'refilezzzzfolderz'u
89 .B whom \-check
90 list the addresses and verify that they are
91 acceptable to the transport service
92 .TP \w'refilezzzzfolderz'u
93 .B quit
94 preserve the draft and exit
95 .TP \w'refilezzzzfolderz'u
96 .B quit \-delete
97 delete the draft and exit
98 .TP \w'refilezzzzfolderz'u
99 .B delete
100 delete the draft and exit
101 .TP \w'refilezzzzfolderz'u
102 .B cd directory
103 use the directory when interpreting attachment file names
104 .TP \w'refilezzzzfolderz'u
105 .B pwd
106 print the working directory for attachment files
107 .TP \w'refilezzzzfolderz'u
108 .B ls [ls-options]
109 list files in the attachment working directory using the ls command
110 .TP \w'refilezzzzfolderz'u
111 .B attach files
112 add the named files to the draft as MIME attachments
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 .BR 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 .BR 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 .BR 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 .BR mh-draft (5)
197 man page for more
198 information.
199
200 .SH FILES
201 .fc ^ ~
202 .nf
203 .ta \w'%etcdir%/ExtraBigFileName  'u
204 ^$HOME/\&.mh\(ruprofile~^The user profile
205 ^<mh\-dir>/draft~^The draft file
206 .fi
207
208 .SH "PROFILE COMPONENTS"
209 .fc ^ ~
210 .nf
211 .ta 2.4i
212 .ta \w'ExtraBigProfileName  'u
213 ^Path:~^To determine the user's nmh directory
214 ^Draft\-Folder:~^To find the default draft\-folder
215 ^Editor:~^To override the default editor
216 ^<lasteditor>\-next:~^To name an editor to be used after exit
217 ^~^from <lasteditor>
218 ^automimeproc:~^If value is 1, and the draft is a MIME
219 ^~^composition file, then automatically call
220 ^~^buildmimeproc prior to sending.
221 ^buildmimeproc:~^Program to translate MIME composition files
222 ^fileproc:~^Program to refile the message
223 ^lproc:~^Program to list the contents of a message
224 ^sendproc:~^Program to use to send the message
225 ^whomproc:~^Program to determine who a message would go to
226 .fi
227
228 .SH "SEE ALSO"
229 send(1), whom(1)
230
231 .SH DEFAULTS
232 .nf
233 .RB ` \-prompt "' defaults to \*(lqWhat\ Now?\ \*(rq"
234 .fi
235
236 .SH CONTEXT
237 None
238
239 .SH BUGS
240 The argument to the
241 .B \-prompt
242 switch must be interpreted as a single
243 token by the shell that invokes
244 .BR whatnow .
245 Therefore, one must
246 usually place the argument to this switch inside double\-quotes.
247 .PP
248 If the initial edit fails,
249 .B whatnow
250 deletes your draft (by renaming
251 it with a leading comma); failure of a later edit preserves the draft.
252 .PP
253 If the
254 .I buildmimeproc
255 fails (returns a nonzero status),
256 .B whatnow
257 simply prints a \*(lqWhat now?\*(rq prompt.
258 .B whatnow
259 depends on the
260 .I buildmimeproc
261 to tell the user that something went wrong.
262 .PP
263 If
264 .I whatnowproc
265 is
266 .BR whatnow ,
267 then
268 .BR comp ,
269 .BR dist ,
270 .BR forw ,
271 and
272 .B repl
273 use a built\-in
274 .BR whatnow ,
275 and do not actually run the
276 .B whatnow
277 program.  Hence, if you define your own
278 .IR whatnowproc ,
279 don't call it
280 .B whatnow
281 since it won't be run.
282 .PP
283 If
284 .I sendproc
285 is
286 .BR send ,
287 then
288 .B whatnow
289 uses a built\-in
290 .BR send ,
291 it does not actually run the
292 .B send
293 program.  Hence, if
294 you define your own
295 .IR sendproc ,
296 don't call it
297 .B send
298 since
299 .B whatnow
300 won't run it.