764234be2903953cf88a3b443730212d274d9081
[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 display
55 list the message being distributed/replied\-to
56 on the terminal
57 .TP \w'refilezzzzfolderz'u
58 .B list
59 list the draft on the terminal
60 .TP \w'refilezzzzfolderz'u
61 .B send
62 send the message
63 .TP \w'refilezzzzfolderz'u
64 .B send \-watch
65 send the message and monitor the delivery process
66 .TP \w'refilezzzzfolderz'u
67 .B push
68 send the message in the background
69 .TP \w'refilezzzzfolderz'u
70 .B quit
71 preserve the draft and exit
72 .TP \w'refilezzzzfolderz'u
73 .B quit \-delete
74 delete the draft and exit
75 .TP \w'refilezzzzfolderz'u
76 .B delete
77 delete the draft and exit
78 .TP \w'refilezzzzfolderz'u
79 .B cd directory
80 use the directory when interpreting attachment file names
81 .TP \w'refilezzzzfolderz'u
82 .B pwd
83 print the working directory for attachment files
84 .TP \w'refilezzzzfolderz'u
85 .B ls [ls-options]
86 list files in the attachment working directory using the ls command
87 .TP \w'refilezzzzfolderz'u
88 .B attach files
89 add the named files to the draft as MIME attachments
90 .TP \w'refilezzzzfolderz'u
91 .B alist [-ln]
92 list the MIME attachments, either short, long [-l] or numbered [-n]
93 .TP \w'refilezzzzfolderz'u
94 .B detach [-n] files-or-numbers
95 remove MIME attachments, either by file name or by number with -n
96 .RE
97 .PP
98 When entering your response, you need only type enough characters
99 to uniquely identify the response.
100 .PP
101 For the
102 .B edit
103 response, any valid switch to the editor is valid.
104 .PP
105 For the
106 .B send
107 and
108 .B push
109 responses, any valid switch to
110 .BR send (1)
111 is valid (as
112 .B push
113 merely invokes
114 .B send
115 with the
116 .B \-push
117 option).
118 .PP
119 For the
120 .B refile
121 response, any valid switch to the
122 .I fileproc
123 is valid.
124 .PP
125 For the
126 .B display
127 and
128 .B list
129 responses, any valid argument to
130 the
131 .I lproc
132 is valid.  If any non\-switch arguments are present, then
133 the pathname of the draft will be excluded from the argument list given
134 to the
135 .I lproc
136 (this is useful for listing another
137 .B nmh
138 message).
139 .PP
140 See
141 .BR mh\-profile (5)
142 for further information about how editors
143 are used by
144 .BR nmh .
145 It also discusses how environment variables can be
146 used to direct
147 .BR whatnow 's
148 actions in complex ways.
149 .PP
150 The
151 .B \-prompt
152 .I string
153 switch sets the prompting string for
154 .BR whatnow .
155 .PP
156 Consult the
157 .BR mh-draft (7)
158 man page for more
159 information.
160
161 .SH FILES
162 .fc ^ ~
163 .nf
164 .ta \w'%etcdir%/ExtraBigFileName  'u
165 ^$HOME/.mmh/profile~^The user profile
166 ^+drafts~^The draft folder
167 .fi
168
169 .SH "PROFILE COMPONENTS"
170 .fc ^ ~
171 .nf
172 .ta 2.4i
173 .ta \w'ExtraBigProfileName  'u
174 ^Path:~^To determine the user's mail storage
175 ^Draft\-Folder:~^To set the default draft\-folder
176 ^Editor:~^To override the default editor
177 ^<lasteditor>\-next:~^To name an editor to be used after exit
178 ^~^from <lasteditor>
179 ^fileproc:~^Program to refile the message
180 ^lproc:~^Program to list the contents of a message
181 ^sendproc:~^Program to use to send the message
182 .fi
183
184 .SH "SEE ALSO"
185 send(1)
186
187 .SH DEFAULTS
188 .nf
189 .RB ` \-prompt "' defaults to \*(lqWhat\ Now?\ \*(rq"
190 .fi
191
192 .SH CONTEXT
193 None
194
195 .SH BUGS
196 The argument to the
197 .B \-prompt
198 switch must be interpreted as a single
199 token by the shell that invokes
200 .BR whatnow .
201 Therefore, one must
202 usually place the argument to this switch inside double\-quotes.
203 .PP
204 If the initial edit fails,
205 .B whatnow
206 deletes your draft (by renaming
207 it with a leading comma); failure of a later edit preserves the draft.
208 .PP
209 If
210 .I whatnowproc
211 is
212 .BR whatnow ,
213 then
214 .BR comp ,
215 .BR dist ,
216 .BR forw ,
217 and
218 .B repl
219 use a built\-in
220 .BR whatnow ,
221 and do not actually run the
222 .B whatnow
223 program.  Hence, if you define your own
224 .IR whatnowproc ,
225 don't call it
226 .B whatnow
227 since it won't be run.
228 .PP
229 If
230 .I sendproc
231 is
232 .BR send ,
233 then
234 .B whatnow
235 uses a built\-in
236 .BR send ,
237 it does not actually run the
238 .B send
239 program.  Hence, if
240 you define your own
241 .IR sendproc ,
242 don't call it
243 .B send
244 since
245 .B whatnow
246 won't run it.