Fixed make_bcc_file () to use contents of From: in draft, if draft_from masquerade...
[mmh] / man / mh-draft.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH MH-DRAFT %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 mh-draft \- draft folder facility for nmh message system
8 .SH SYNOPSIS
9 any
10 .B nmh
11 command
12 .SH DESCRIPTION
13 There are a number of interesting advanced facilities for the composition of
14 outgoing mail.
15 .PP
16 .SS "The Draft Folder"
17 The
18 .BR comp ,
19 .BR dist ,
20 .BR forw ,
21 and
22 .B repl
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 and
43 .BR repl ).
44 .PP
45 If the swith
46 .B \-draftmessage
47 .I msg
48 is given, the specified draft is used to compose the message.  If
49 .B \-draftmessage
50 .I msg
51 is not used, then the
52 draft defaults to `new' (create a new draft) unless the user invokes
53 .B comp
54 with
55 .BR \-use ,
56 in which case the default is `cur'.
57 .PP
58 Hence, the user may have several message compositions in progress
59 simultaneously.  Now, all of the
60 .B nmh
61 tools are available on each of the user's message drafts (e.g.
62 .BR show ,
63 .BR scan ,
64 .BR pick ,
65 and so on).  If the folder does not exist, the user is asked if it should be
66 created (just like with
67 .BR refile ).
68 Also, the last draft message
69 the user was composing is known as `cur' in the draft folder.
70 .PP
71 Furthermore, the
72 .B send
73 command has these switches as well.  Hence,
74 from the shell, the user can send off whatever drafts desired using the
75 standard
76 .B nmh
77 `msgs' convention with
78 .B \-draftmessage
79 .IR msgs .
80 If no `msgs' are given, it defaults to `cur'.
81 .PP
82 In addition, all five programs have a
83 .B \-nodraftfolder
84 switch, which undoes the last occurrence of
85 .B \-draftfolder
86 .I folder
87 (useful if the latter occurs in the user's
88 .B nmh
89 profile).
90 .PP
91 If the user does not give the
92 .B \-draftfolder
93 .I +folder
94 switch, then all these commands act \*(lqnormally\*(rq.  Note that the
95 .B \-draft
96 switch to
97 .B send
98 and
99 .B show
100 still refers to the file called `draft' in the user's
101 .B nmh
102 directory.  In the interests of economy of expression, when using
103 .B comp
104 or
105 .BR send ,
106 the user needn't prefix the draft `msg' or `msgs' with
107 .BR \-draftmessage .
108 Both of these
109 commands accept a `file' or `files' argument, and they will, if given
110 .B \-draftfolder
111 .I +folder
112 treat these arguments as `msg' or `msgs'. (This may appear to be
113 inconsistent, at first, but it saves a lot of typing) Hence,
114 .PP
115 .RS
116 .nf
117 send -draftfolder +drafts first
118 .fi
119 .RE
120 .PP
121 is the same as
122 .PP
123 .RS
124 .nf
125 send -draftfolder +drafts -draftmessage first
126 .fi
127 .RE
128 .PP
129 To make all this a bit more clear, here are some examples.  Let's assume
130 that the following entries are in the
131 .B nmh
132 profile:
133 .PP
134 .RS 5
135 .nf
136 Draft\-Folder: +drafts
137 sendf: \-draftfolder +drafts
138 .fi
139 .RE
140 .PP
141 Furthermore, let's assume that the program
142 .B sendf
143 is a (symbolic) link in the user's
144 .I $HOME/bin/
145 directory to
146 .BR send .
147 Then, any of the commands
148 .PP
149 .RS 5
150 .nf
151 comp
152 dist
153 forw
154 repl
155 .fi
156 .RE
157 .PP
158 constructs the message draft in the `draft' folder using the `new'
159 message number.  Furthermore, they each define `cur' in this folder to
160 be that message draft.  If the user were to use the
161 .B quit
162 option at `What now?' level, then later on, if no other draft composition
163 was done, the draft could be sent with simply
164 .PP
165 .RS 5
166 .nf
167 sendf
168 .fi
169 .RE
170 .PP
171 Or, if more editing was required, the draft could be edited with
172 .PP
173 .RS 5
174 .nf
175 comp -use
176 .fi
177 .RE
178 .PP
179 Instead, if other drafts had been composed in the meantime, so that this
180 message draft was no longer known as `cur' in the `draft' folder, then
181 the user could
182 .B scan
183 the folder to see which message draft in the
184 folder should be used for editing or sending.  Clever users could even
185 employ a back-quoted
186 .B pick
187 to do the work:
188 .PP
189 .RS 5
190 .nf
191 comp -use `pick +drafts -to nmh-workers`
192 .fi
193 .RE
194 .PP
195 or
196 .PP
197 .RS 5
198 .nf
199 sendf `pick +drafts -to nmh-workers`
200 .fi
201 .RE
202 .PP
203 Note that in the
204 .B comp
205 example, the output from
206 .B pick
207 must resolve to a single message draft (it makes no sense to talk about
208 composing two or more drafts with one invocation of
209 .BR comp ).
210 In contrast, in the
211 .B send
212 example, as many message drafts as desired can appear, since
213 .B send
214 doesn't mind sending more than one draft at a time.
215 .PP
216 Note that the argument
217 .B \-draftfolder
218 .I +folder
219 is not included in the profile entry for
220 .BR send ,
221 since when
222 .BR comp ,
223 et. al., invoke
224 .B send
225 directly, they supply
226 .B send
227 with the UNIX pathname of the message draft, and
228 .B not
229 a
230 .B \-draftmessage
231 .I msg
232 argument. As far as
233 .B send
234 is concerned, a draft folder is not being used.
235 .PP
236 It is important to realize that
237 .B nmh
238 treats the draft folder like a standard
239 .B nmh
240 folder in nearly all respects.  There are two exceptions:
241 .PP
242 First, under no circumstancs will the
243 .B \-draftfolder
244 .I folder
245 switch cause the named folder to become the current folder.
246 .PP
247 Obviously, if the folder appeared in the context of a standard
248 .I +folder
249 argument to an
250 .B nmh
251 program, as in
252 .PP
253 .RS 5
254 .nf
255 scan +drafts
256 .fi
257 .RE
258 .PP
259 it might become the current folder, depending on the context changes of the
260 .B nmh
261 program in question.
262 .PP
263 Second, although conceptually
264 .B send
265 deletes the `msgs' named in the draft folder, it does not call
266 .I delete\-prog
267 to perform the deletion.
268
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
334 .SH CONTEXT
335 None