5 .\" include the -mh macro file
8 .TH MH-DRAFT %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
10 mh-draft \- draft folder facility for nmh message system
18 There are a number of interesting advanced facilities for the composition of
21 .Uh "The Draft Folder"
22 The \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands have
23 two additional switches, `\-draftfolder\ +folder' and `\-draftmessage\ msg'
24 which allow you to manipulate the various draft messages you are composing.
26 If `\-draftfolder\ +folder' is used, these commands are
27 directed to construct a draft message in the indicated folder.
28 (The \*(lqDraft\-Folder:\*(rq profile entry may be used to declare a
29 default draft folder for use with \fIcomp\fR, \fIdist\fR, \fIforw\fR,
32 If the swith `\-draftmessage\ msg' is given, the specified draft is used
33 to compose the message. If `\-draftmessage\ msg' is not used, then the
34 draft defaults to `new' (create a new draft) unless the user invokes
35 \fIcomp\fR with `\-use', in which case the default is `cur'.
37 Hence, the user may have several message compositions in progress
38 simultaneously. Now, all of the \fInmh\fR tools are available on each of
39 the user's message drafts (e.g., \fIshow\fR, \fIscan\fR, \fIpick\fR, and
40 so on). If the folder does not exist, the user is asked if it should be
41 created (just like with \fIrefile\fR). Also, the last draft message
42 the user was composing is known as `cur' in the draft folder.
44 Furthermore, the \fIsend\fR command has these switches as well. Hence,
45 from the shell, the user can send off whatever drafts desired using the
46 standard \fInmh\fR `msgs' convention with `\-draftmessage msgs'. If no
47 `msgs' are given, it defaults to `cur'.
49 In addition, all five programs have a `\-nodraftfolder' switch, which
50 undoes the last occurrence of `\-draftfolder\ folder' (useful if the
51 latter occurs in the user's \fInmh\fR profile).
53 If the user does not give the `\-draftfolder\ +folder' switch, then
54 all these commands act ``normally''. Note that the `\-draft' switch
55 to \fIsend\fR and \fIshow\fR still refers to the file called `draft'
56 in the user's \fInmh\fR directory. In the interests of economy of
57 expression, when using \fIcomp\fR or \fIsend\fR, the user needn't
58 prefix the draft `msg' or `msgs' with `\-draftmessage'. Both of these
59 commands accept a `file' or `files' argument, and they will, if given
60 `\-draftfolder\ +folder' treat these arguments as `msg' or `msgs'.
61 (This may appear to be inconsistent, at first, but it saves a lot of
65 send -draftf +drafts first
70 send -draftf +drafts -draftm first
72 To make all this a bit more clear, here are some examples. Let's assume
73 that the following entries are in the \fInmh\fR profile:
77 Draft\-Folder: +drafts
78 sendf: -draftfolder +drafts
82 Furthermore, let's assume that the program \fIsendf\fR is a (symbolic)
83 link in the user's \fB$HOME/bin/\fR directory to \fIsend\fR. Then, any
95 constructs the message draft in the `draft' folder using the `new'
96 message number. Furthermore, they each define `cur' in this folder to
97 be that message draft. If the user were to use the \fIquit\fR option
98 at `What now?' level, then later on, if no other draft composition was
99 done, the draft could be sent with simply
104 Or, if more editing was required, the draft could be edited with
109 Instead, if other drafts had been composed in the meantime, so that this
110 message draft was no longer known as `cur' in the `draft' folder, then
111 the user could \fIscan\fR the folder to see which message draft in the
112 folder should be used for editing or sending. Clever users could even
113 employ a back-quoted \fIpick\fR to do the work:
116 comp -use `pick +drafts -to nmh-workers`
121 sendf `pick +drafts -to nmh-workers`
123 Note that in the \fIcomp\fR example, the output from \fIpick\fR must
124 resolve to a single message draft (it makes no sense to talk about
125 composing two or more drafts with one invocation of \fIcomp\fR).
126 In contrast, in the \fIsend\fR example, as many message drafts as desired
127 can appear, since \fIsend\fR doesn't mind sending more than one draft
130 Note that the argument `\-draftfolder\ +folder' is not included in the
131 profile entry for \fIsend\fR, since when \fIcomp\fR, et. al., invoke
132 \fIsend\fR directly, they supply \fIsend\fR with the UNIX pathname
133 of the message draft, and \fBnot\fR a `draftmessage\ msg' argument.
134 As far as \fIsend\fR is concerned, a \fIdraft folder\fR is not being used.
136 It is important to realize that \fInmh\fR treats the draft folder
137 like a standard \fInmh\fR folder in nearly all respects. There are
140 First, under no circumstancs will the `\-draftfolder\ folder' switch cause the
141 named folder to become the current folder.
143 Obviously, if the folder appeared in the context of a standard `+folder'
144 argument to an \fInmh\fR program, as in
149 it might become the current folder, depending on the context changes of
150 the \fInmh\fR program in question.
152 Second, although conceptually \fIsend\fR deletes the `msgs' named in
153 the draft folder, it does not call `delete-prog' to perform the deletion.
155 .Uh "What Happens if the Draft Exists"
156 When the \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands
157 are invoked and the draft you indicated already exists, these programs
158 will prompt the user for a reponse directing the program's action.
162 Draft ``/home/foobar/nmhbox/draft'' exists (xx bytes).
166 The appropriate responses and their meanings are:
169 ^replace - deletes the draft and starts afresh
170 ^list - lists the draft
171 ^refile - files the draft into a folder and starts afresh
172 ^quit - leaves the draft intact and exits
175 In addition, if you specified `\-draftfolder\ folder' to the command,
176 then one other response will be accepted:
179 ^new - finds a new draft,
182 just as if `\-draftmessage\ new' had been given.
183 Finally, the \fIcomp\fR command will accept one more response:
186 ^use - re-uses the draft
189 just as if `\-use' had been given.