comparison ch03.roff @ 14:55ec590cfa07

Wrote about the draft folder.
author markus schnalke <meillo@marmaro.de>
date Sun, 22 Apr 2012 11:49:46 +0200
parents 7ca384d68edc
children 81f703140554
comparison
equal deleted inserted replaced
13:9e17ad63f7f1 14:55ec590cfa07
115 change. Even if the `Content-MD5' header field is useful sometimes, 115 change. Even if the `Content-MD5' header field is useful sometimes,
116 I value its usefulnes less than the improvement in maintainability, caused 116 I value its usefulnes less than the improvement in maintainability, caused
117 by the removal. 117 by the removal.
118 118
119 119
120 .H1 "Draft and Trash Folders
121 .U2 "The Draft Folder
122 .P
123 Historically, MH provided exactly one draft message, named `\fLdraft\fP' and
124 being located in the MH directory. When starting to compose another message
125 before the former one was sent, the user had been questioned wether to use,
126 refile or replace the old draft. Working on multiple drafts at the same time
127 was impossible. One could only work on them in alteration by refiling the
128 previous one to some directory and fetching some other one for reediting.
129 This manual draft management needed to be done each time the user wanted
130 to switch between editing one draft to editing another.
131 .P
132 To allow true parallel editing of drafts, in a straight forward way, the
133 draft folder facility exists. It had been introduced already in July 1984
134 by Marshall T. Rose. The facility was deactivated by default.
135 Even in nmh, the draft folder facility remained deactivated by default.
136 At least, Richard Coleman added the man page \fImh-draft(5)\fI to document
137 the feature well.
138 .P
139 The only advantage of not using the draft folder facility is the static
140 name of the draft file. This could be an issue for MH frontends like mh-e.
141 But as they likely want to provide working on multiple drafts in parallel,
142 the issue is only concerning compatibility. The aim of nmh to stay compatible
143 prevented the default activation of the draft folder facility.
144 .P
145 On the other hand, a draft folder is the much more natural concept than
146 a draft message. MH's mail storage consists of folders and messages,
147 the messages named with ascending numbers. A draft message breaks with this
148 concept by introducing a message in a file named ``draft''. This draft
149 message is special. It can not be simply listed with the available tools,
150 but instead special switches were required. I.e. corner-cases were
151 introduced. A draft folder, in contrast, does not introduce such
152 corner-cases. The available tools can operate on the messages within that
153 folder like on any messages within any mail folders. The only difference
154 is the fact that the default folder for \fLsend\fP is the draft folder,
155 instead of the current folder, like for all other tools.
156 .P
157 The trivial part of the change was activating the draft folder facility
158 by default and setting a default name for this folder. Obviously, I chose
159 the name ``\fL+drafts\fP''. This made the \fL\-draftfolder\fP and
160 \fL\-draftmessage\fP switches useless, thus I could remove them two.
161 The more difficult but also the part that showed the real improvement,
162 was updating the tools to the new concept. \fL\-draft\fP switches could
163 be dropped, as operating on a draft message became indistinguishable to
164 operating on any other message for the tools. \fLcomp\fP still has its
165 \fL\-use\fP switch for switching between its two modes: (1) Compose a new
166 draft, possibly by taking some existing message as a form. (2) Modify
167 an existing draft. In either case, the behavior of \fLcomp\fP is
168 deterministic. There is no more need to query the user. I consider this
169 a major improvement. By making \fLsend\fP simply operate on the current
170 message in the draft folder by default, with both, message and folder,
171 overridable by specifying them on the command line, it is now possible
172 to send any message in the storage by simply specifying its folder and
173 name.
174 .P
175 All theses changes converted special cases to regular cases, thus
176 simplifying the tools and increasing the flexibility.
177
120 178
121 .H1 "Paths to ... 179 .H1 "Paths to ...
122 .P 180 .P
123 foo 181 foo
124 182