1MH-DRAFT(5) [nmh-1.2-20070115cvs] MH-DRAFT(5)
2
3
4
6 mh-draft - draft folder facility for nmh message system
7
9 any nmh command
10
12 There are a number of interesting advanced facilities for the composi‐
13 tion of outgoing mail.
14
15 The Draft Folder
16 The comp, dist, forw, and repl commands have two additional switches,
17 -draftfolder +folder and -draftmessage msg which allow you to manipu‐
18 late the various draft messages you are composing.
19
20 If -draftfolder +folder is used, these commands are directed to con‐
21 struct a draft message in the indicated folder. (The “Draft-Folder”
22 profile entry may be used to declare a default draft folder for use
23 with comp, dist, forw, and repl).
24
25 If the swith -draftmessage msg is given, the specified draft is used to
26 compose the message. If -draftmessage msg is not used, then the draft
27 defaults to `new' (create a new draft) unless the user invokes comp
28 with -use, in which case the default is `cur'.
29
30 Hence, the user may have several message compositions in progress
31 simultaneously. Now, all of the nmh tools are available on each of the
32 user's message drafts (e.g. show, scan, pick, and so on). If the
33 folder does not exist, the user is asked if it should be created (just
34 like with refile). Also, the last draft message the user was composing
35 is known as `cur' in the draft folder.
36
37 Furthermore, the send command has these switches as well. Hence, from
38 the shell, the user can send off whatever drafts desired using the
39 standard nmh `msgs' convention with -draftmessage msgs. If no `msgs'
40 are given, it defaults to `cur'.
41
42 In addition, all five programs have a -nodraftfolder switch, which
43 undoes the last occurrence of -draftfolder folder (useful if the latter
44 occurs in the user's nmh profile).
45
46 If the user does not give the -draftfolder +folder switch, then all
47 these commands act “normally”. Note that the -draft switch to send and
48 show still refers to the file called `draft' in the user's nmh direc‐
49 tory. In the interests of economy of expression, when using comp or
50 send, the user needn't prefix the draft `msg' or `msgs' with -draftmes‐
51 sage. Both of these commands accept a `file' or `files' argument, and
52 they will, if given -draftfolder +folder treat these arguments as `msg'
53 or `msgs'. (This may appear to be inconsistent, at first, but it saves
54 a lot of typing) Hence,
55
56 send -draftfolder +drafts first
57
58 is the same as
59
60 send -draftfolder +drafts -draftmessage first
61
62 To make all this a bit more clear, here are some examples. Let's
63 assume that the following entries are in the nmh profile:
64
65 Draft-Folder: +drafts
66 sendf: -draftfolder +drafts
67
68 Furthermore, let's assume that the program sendf is a (symbolic) link
69 in the user's $HOME/bin/ directory to send. Then, any of the commands
70
71 comp
72 dist
73 forw
74 repl
75
76 constructs the message draft in the `draft' folder using the `new' mes‐
77 sage number. Furthermore, they each define `cur' in this folder to be
78 that message draft. If the user were to use the quit option at `What
79 now?' level, then later on, if no other draft composition was done, the
80 draft could be sent with simply
81
82 sendf
83
84 Or, if more editing was required, the draft could be edited with
85
86 comp -use
87
88 Instead, if other drafts had been composed in the meantime, so that
89 this message draft was no longer known as `cur' in the `draft' folder,
90 then the user could scan the folder to see which message draft in the
91 folder should be used for editing or sending. Clever users could even
92 employ a back-quoted pick to do the work:
93
94 comp -use `pick +drafts -to nmh-workers`
95
96 or
97
98 sendf `pick +drafts -to nmh-workers`
99
100 Note that in the comp example, the output from pick must resolve to a
101 single message draft (it makes no sense to talk about composing two or
102 more drafts with one invocation of comp). In contrast, in the send
103 example, as many message drafts as desired can appear, since send
104 doesn't mind sending more than one draft at a time.
105
106 Note that the argument -draftfolder +folder is not included in the pro‐
107 file entry for send, since when comp, et. al., invoke send directly,
108 they supply send with the UNIX pathname of the message draft, and not a
109 -draftmessage msg argument. As far as send is concerned, a draft folder
110 is not being used.
111
112 It is important to realize that nmh treats the draft folder like a
113 standard nmh folder in nearly all respects. There are two exceptions:
114
115 First, under no circumstancs will the -draftfolder folder switch cause
116 the named folder to become the current folder.
117
118 Obviously, if the folder appeared in the context of a standard +folder
119 argument to an nmh program, as in
120
121 scan +drafts
122
123 it might become the current folder, depending on the context changes of
124 the nmh program in question.
125
126 Second, although conceptually send deletes the `msgs' named in the
127 draft folder, it does not call delete-prog to perform the deletion.
128
129
130 What Happens if the Draft Exists
131 When the comp, dist, forw, and repl commands are invoked and the draft
132 you indicated already exists, these programs will prompt the user for a
133 reponse directing the program's action. The prompt is
134
135 Draft ``/home/foobar/nmhbox/draft'' exists (xx bytes).
136 Disposition?
137
138 The appropriate responses and their meanings are:
139
140 replace - deletes the draft and starts afresh
141 list - lists the draft
142 refile - files the draft into a folder and starts afresh
143 quit - leaves the draft intact and exits
144
145 In addition, if you specified -draftfolder folder to the command, then
146 one other response will be accepted:
147
148 new - finds a new draft
149
150 just as if -draftmessage new had been given. Finally, the comp command
151 will accept one more response:
152
153 use - re-uses the draft
154
155 just as if -use had been given.
156
157
159 None
160
161
162
163MH.6.8 1 Jul 2003 MH-DRAFT(5)