comparison discussion.roff @ 129:01af3c0dfe7b

Reworked the text about the Draft Folder.
author markus schnalke <meillo@marmaro.de>
date Mon, 02 Jul 2012 17:59:21 +0200
parents 4a9a97d9d6b5
children 0b9aa74ced4d
comparison
equal deleted inserted replaced
128:76c440261ebb 129:01af3c0dfe7b
3358 3358
3359 3359
3360 3360
3361 3361
3362 3362
3363 .H1 "Concept Exploitation/Homogeneity 3363 .H1 "Concept Exploitation \"Homogeneity
3364 3364
3365 3365
3366 .H2 "Draft Folder 3366 .H2 "Draft Folder
3367 .P 3367 .P
3368 Historically, MH provided exactly one draft message, named 3368 In the beginning, MH had the concept of a draft message.
3369 This is the file
3369 .Fn draft 3370 .Fn draft
3370 and 3371 in the MH directory, which is treated special.
3371 being located in the MH directory. 3372 On composing a message, this draft file was used.
3372 When starting to compose another message 3373 As the draft file was one particular file, only one draft could be
3373 before the former one was sent, the user had been questioned whether to use, 3374 managed at any time.
3374 refile or replace the old draft. 3375 When starting to compose another message before the former one was sent,
3375 Working on multiple drafts at the same time 3376 the user had to decide among:
3376 was impossible. 3377 .BU
3377 One could only work on them in alteration by refiling the 3378 Use the old draft to finish and send it before starting with a new one.
3378 previous one to some directory and fetching some other one for reediting. 3379 .BU
3379 This manual draft management needed to be done each time the user wanted 3380 Discard the old draft, replacing it with the new one.
3380 to switch between editing one draft to editing another. 3381 .BU
3381 .P 3382 Preserve the old draft by refiling it to a folder.
3382 To allow true parallel editing of drafts, in a straight forward way, the 3383 .P
3383 draft folder facility exists. 3384 This was, it was only possible to work in alternation on multiple drafts.
3384 It had been introduced already in July 1984 3385 Therefore, the current draft needed to be refiled to a folder and
3385 by Marshall T. Rose. 3386 another one re-using for editing.
3386 The facility was inactive by default. 3387 Working on multiple drafts at the same time was impossible.
3387 Even in nmh, the draft folder facility remained inactive by default. 3388 The usual approach of switching to a different MH context did not
3389 change anything.
3390 .P
3391 The draft folder facility exists to
3392 allow true parallel editing of drafts, in a straight forward way.
3393 It was introduced by Marshall T. Rose, already in 1984.
3394 Similar to other new features, the draft folder was inactive by default.
3395 Even in nmh, the highly useful draft folder was not available
3396 out-of-the-box.
3388 At least, Richard Coleman added the man page 3397 At least, Richard Coleman added the man page
3389 .Mp mh-draft(5) 3398 .Mp mh-draft (5)
3390 to document 3399 to better document the feature.
3391 the feature well. 3400 .P
3392 .P 3401 Not using the draft folder facility has the single advantage of having
3393 The only advantage of not using the draft folder facility is the static 3402 the draft file at a static location.
3394 name of the draft file. 3403 This is simple in simple cases but the concept does not scale for more
3395 This could be an issue for MH front-ends like mh-e. 3404 complex cases.
3396 But as they likely want to provide working on multiple drafts in parallel, 3405 The concept of the draft message is too limited for the problem.
3397 the issue is only concerning compatibility. 3406 Therefore the draft folder was introduced.
3398 The aim of nmh to stay compatible 3407 It is the more powerful and more natural concept.
3399 prevented the default activation of the draft folder facility. 3408 The draft folder is a folder like any other folder in MH.
3400 .P 3409 Its messages can be listed like any other messages.
3401 On the other hand, a draft folder is the much more natural concept than 3410 A draft message is no longer a special case.
3402 a draft message. 3411 Tools do not need special switches to work on the draft message.
3403 MH's mail storage consists of folders and messages, 3412 Hence corner-cases were removed.
3404 the messages named with ascending numbers. 3413 .P
3405 A draft message breaks with this 3414 The trivial part of the work was activating the draft folder with a
3406 concept by introducing a message in a file named 3415 default name.
3407 .Fn draft . 3416 I chose the name
3408 This draft 3417 .Fn +drafts
3409 message is special. 3418 for obvious reasons.
3410 It can not be simply listed with the available tools, 3419 In consequence, the command line switches
3411 but instead requires special switches. 3420 .Sw -draftfolder
3412 I.e. corner-cases were 3421 and
3413 introduced. 3422 .Sw -draftmessage
3414 A draft folder, in contrast, does not introduce such 3423 could be removed.
3415 corner-cases. 3424 More difficult but also more improving was updating the tools to the
3416 The available tools can operate on the messages within that 3425 new concept.
3417 folder like on any messages within any mail folders. 3426 For nearly three decades, the tools needed to support two draft handling
3418 The only difference 3427 approaches.
3419 is the fact that the default folder for 3428 By fully switching to the draft folder, the tools could be simplified
3429 by dropping the awkward draft message handling code.
3430 .Sw -draft
3431 switches were removed because operating on a draft message is no longer
3432 special.
3433 It became indistinguishable to operating on any other message.
3434 There is no more need to query the user for draft handling.
3435 It is always possible to add another new draft.
3436 Refiling drafts is without difference to refiling other messages.
3437 All these special cases are gone.
3438 Yet, one draft-related switch remained.
3439 .Pn comp
3440 still has
3441 .Sw -[no]use
3442 for switching between two modes:
3443 .BU
3444 .Sw -use :
3445 Modify an existing draft.
3446 .BU
3447 .Sw -nouse :
3448 Compose a new draft, possibly taking some existing message as a form.
3449 .P
3450 In either case, the behavior of
3451 .Pn comp
3452 is deterministic.
3453 .P
3420 .Pn send 3454 .Pn send
3421 is the draft folder, 3455 now operates on the current message in the draft folder by default.
3422 instead of the current folder, like for all other tools. 3456 As message and folder can both be overridden by specifying them on
3423 .P 3457 the command line, it is possible to send any message in the mail storage
3424 The trivial part of the change was activating the draft folder facility 3458 by simply specifying its number and folder.
3425 by default and setting a default name for this folder. 3459 In contrast to the other tools,
3426 Obviously, I chose
3427 the name
3428 .Fn +drafts .
3429 This made the
3430 .Sw -draftfolder
3431 and
3432 .Sw -draftmessage
3433 switches useless, and I could remove them.
3434 The more difficult but also the part that showed the real improvement,
3435 was updating the tools to the new concept.
3436 .Sw -draft
3437 switches could
3438 be dropped, as operating on a draft message became indistinguishable to
3439 operating on any other message for the tools.
3440 .Pn comp
3441 still has its
3442 .Sw -use
3443 switch for switching between its two modes: (1) Compose a new
3444 draft, possibly by taking some existing message as a form.
3445 (2) Modify
3446 an existing draft.
3447 In either case, the behavior of
3448 .Pn comp is
3449 deterministic.
3450 There is no more need to query the user.
3451 I consider this
3452 a major improvement.
3453 By making
3454 .Pn send 3460 .Pn send
3455 simply operate on the current 3461 takes the draft folder as its default folder.
3456 message in the draft folder by default, with message and folder both 3462 .P
3457 overridable by specifying them on the command line, it is now possible 3463 Dropping the draft message concept in favor for the draft folder concept,
3458 to send a draft anywhere within the storage by simply specifying its folder 3464 removed special cases with regular cases.
3459 and name. 3465 This simplified the source code of the tools, as well as the concepts.
3460 .P 3466 In mmh, draft management does not break with the MH concepts
3461 All theses changes converted special cases to regular cases, thus 3467 but applies them.
3462 simplifying the tools and increasing the flexibility. 3468 Most of the work was already done by Rose in the eighties.
3469 The original improvement in mmh is dropping the draft message approach
3470 completely and thus simplifying the tools, the documentation and the
3471 system as a whole.
3472 Although my part in the draft handling improvement was small,
3473 it was important.
3474
3463 3475
3464 3476
3465 .H2 "Trash Folder 3477 .H2 "Trash Folder
3466 .P 3478 .P
3467 Similar to the situation for drafts is the situation for removed messages. 3479 Similar to the situation for drafts is the situation for removed messages.