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