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