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