Removed note from BUGS section of several man pages saying
[mmh] / man / mh-draft.man
1 .TH MH-DRAFT %manext5% "November 6, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 mh-draft \- draft folder facility for nmh message system
7 .SH SYNOPSIS
8 any
9 .B nmh
10 command
11 .SH DESCRIPTION
12 There are a number of interesting advanced facilities for the composition of
13 outgoing mail.
14 .PP
15 .SS "The Draft Folder"
16 The
17 .BR comp ,
18 .BR dist ,
19 .BR forw ,
20 .BR repl ,
21 and
22 .B whom
23 commands have two additional switches,
24 .B \-draftfolder
25 .I +folder
26 and
27 .B \-draftmessage
28 .I msg
29 which allow you to manipulate the various draft messages you are composing.
30 .PP
31 If
32 .B \-draftfolder
33 .I +folder
34 is used, these commands are
35 directed to construct a draft message in the indicated folder.
36 (The
37 .RI \*(lq Draft\-Folder \*(rq
38 profile entry may be used to declare a default draft folder for use with
39 .BR comp ,
40 .BR dist ,
41 .BR forw ,
42 .BR repl ,
43 and
44 .B whom ).
45 .PP
46 If the swith
47 .B \-draftmessage
48 .I msg
49 is given, the specified draft is used to compose the message.  If
50 .B \-draftmessage
51 .I msg
52 is not used, then the
53 draft defaults to `new' (create a new draft) unless the user invokes
54 .B comp
55 with
56 .BR \-use ,
57 in which case the default is `cur'.
58 .PP
59 Hence, the user may have several message compositions in progress
60 simultaneously.  Now, all of the
61 .B nmh
62 tools are available on each of the user's message drafts (e.g.
63 .BR show ,
64 .BR scan ,
65 .BR pick ,
66 and so on).  If the folder does not exist, the user is asked if it should be
67 created (just like with
68 .BR refile ).
69 Also, the last draft message
70 the user was composing is known as `cur' in the draft folder.
71 .PP
72 Furthermore, the
73 .B send
74 command has these switches as well.  Hence,
75 from the shell, the user can send off whatever drafts desired using the
76 standard
77 .B nmh
78 `msgs' convention with
79 .B \-draftmessage
80 .IR msgs .
81 If no `msgs' are given, it defaults to `cur'.
82 .PP
83 In addition, all five programs have a
84 .B \-nodraftfolder
85 switch, which undoes the last occurrence of
86 .B \-draftfolder
87 .I folder
88 (useful if the latter occurs in the user's
89 .B nmh
90 profile).
91 .PP
92 If the user does not give the
93 .B \-draftfolder
94 .I +folder
95 switch, then all these commands act \*(lqnormally\*(rq.  Note that the
96 .B \-draft
97 switch to
98 .B send
99 and
100 .B show
101 still refers to the file called `draft' in the user's
102 .B nmh
103 directory.  In the interests of economy of expression, when using
104 .B comp
105 or
106 .BR send ,
107 the user needn't prefix the draft `msg' or `msgs' with
108 .BR \-draftmessage .
109 Both of these
110 commands accept a `file' or `files' argument, and they will, if given
111 .B \-draftfolder
112 .I +folder
113 treat these arguments as `msg' or `msgs'. (This may appear to be
114 inconsistent, at first, but it saves a lot of typing) Hence,
115 .PP
116 .RS
117 .nf
118 send -draftfolder +drafts first
119 .fi
120 .RE
121 .PP
122 is the same as
123 .PP
124 .RS
125 .nf
126 send -draftfolder +drafts -draftmessage first
127 .fi
128 .RE
129 .PP
130 To make all this a bit more clear, here are some examples.  Let's assume
131 that the following entries are in the
132 .B nmh
133 profile:
134 .PP
135 .RS 5
136 .nf
137 Draft\-Folder: +drafts
138 sendf: \-draftfolder +drafts
139 .fi
140 .RE
141 .PP
142 Furthermore, let's assume that the program
143 .B sendf
144 is a (symbolic) link in the user's
145 .I $HOME/bin/
146 directory to
147 .BR send .
148 Then, any of the commands
149 .PP
150 .RS 5
151 .nf
152 comp
153 dist
154 forw
155 repl
156 .fi
157 .RE
158 .PP
159 constructs the message draft in the `draft' folder using the `new'
160 message number.  Furthermore, they each define `cur' in this folder to
161 be that message draft.  If the user were to use the
162 .B quit
163 option at `What now?' level, then later on, if no other draft composition
164 was done, the draft could be sent with simply
165 .PP
166 .RS 5
167 .nf
168 sendf
169 .fi
170 .RE
171 .PP
172 Or, if more editing was required, the draft could be edited with
173 .PP
174 .RS 5
175 .nf
176 comp -use
177 .fi
178 .RE
179 .PP
180 Instead, if other drafts had been composed in the meantime, so that this
181 message draft was no longer known as `cur' in the `draft' folder, then
182 the user could
183 .B scan
184 the folder to see which message draft in the
185 folder should be used for editing or sending.  Clever users could even
186 employ a backquoted
187 .B pick
188 to do the work:
189 .PP
190 .RS 5
191 .nf
192 comp -use `pick +drafts -to nmh-workers`
193 .fi
194 .RE
195 .PP
196 or
197 .PP
198 .RS 5
199 .nf
200 sendf `pick +drafts -to nmh-workers`
201 .fi
202 .RE
203 .PP
204 Note that in the
205 .B comp
206 example, the output from
207 .B pick
208 must resolve to a single message draft (it makes no sense to talk about
209 composing two or more drafts with one invocation of
210 .BR comp ).
211 In contrast, in the
212 .B send
213 example, as many message drafts as desired can appear, since
214 .B send
215 doesn't mind sending more than one draft at a time.
216 .PP
217 Note that the argument
218 .B \-draftfolder
219 .I +folder
220 is not included in the profile entry for
221 .BR send ,
222 since when
223 .BR comp ,
224 et. al., invoke
225 .B send
226 directly, they supply
227 .B send
228 with the UNIX pathname of the message draft, and
229 .B not
230 a
231 .B \-draftmessage
232 .I msg
233 argument. As far as
234 .B send
235 is concerned, a draft folder is not being used.
236 .PP
237 It is important to realize that
238 .B nmh
239 treats the draft folder like a standard
240 .B nmh
241 folder in nearly all respects.  There are two exceptions:
242 .PP
243 First, under no circumstancs will the
244 .B \-draftfolder
245 .I folder
246 switch cause the named folder to become the current folder.
247 .PP
248 Obviously, if the folder appeared in the context of a standard
249 .I +folder
250 argument to an
251 .B nmh
252 program, as in
253 .PP
254 .RS 5
255 .nf
256 scan +drafts
257 .fi
258 .RE
259 .PP
260 it might become the current folder, depending on the context changes of the
261 .B nmh
262 program in question.
263 .PP
264 Second, although conceptually
265 .B send
266 deletes the `msgs' named in the draft folder, it does not call
267 .I delete\-prog
268 to perform the deletion.
269 .SS "What Happens if the Draft Exists"
270 When the
271 .BR comp ,
272 .BR dist ,
273 .BR forw ,
274 and
275 .B repl
276 commands
277 are invoked and the draft you indicated already exists, these programs
278 will prompt the user for a reponse directing the program's action.
279 The prompt is
280 .PP
281 .RS 5
282 .nf
283 Draft ``/home/foobar/nmhbox/draft'' exists (xx bytes).
284 Disposition?
285 .fi
286 .RE
287 .PP
288 The appropriate responses and their meanings are:
289 .PP
290 .RS 5
291 .fc ^ ~
292 .nf
293 .ta \w'replace 'u
294 .BR ^replace~^ "- deletes the draft and starts afresh"
295 .BR ^list~^ "- lists the draft"
296 .BR ^refile~^ "- files the draft into a folder and starts afresh"
297 .BR ^quit~^ "- leaves the draft intact and exits"
298 .fi
299 .RE
300 .PP
301 In addition, if you specified
302 .B \-draftfolder
303 .I folder
304 to the command, then one other response will be accepted:
305 .PP
306 .RS 5
307 .fc ^ ~
308 .nf
309 .ta \w'replace 'u
310 .BR ^new~^ "- finds a new draft"
311 .fi
312 .RE
313 .PP
314 just as if
315 .B \-draftmessage
316 .I new
317 had been given.
318 Finally, the
319 .B comp
320 command will accept one more response:
321 .PP
322 .RS 5
323 .fc ^ ~
324 .nf
325 .ta \w'replace 'u
326 .BR ^use~^ "- re-uses the draft"
327 .fi
328 .RE
329 .PP
330 just as if
331 .B \-use
332 had been given.
333 .SH CONTEXT
334 None