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