docs/master

diff ch03.roff @ 19:ab5253e48c74

Wrote about the directory split. style: New macro for env vars.
author markus schnalke <meillo@marmaro.de>
date Tue, 24 Apr 2012 18:02:08 +0200
parents db3567c9cc3f
children 7a100c80fa91
line diff
     1.1 --- a/ch03.roff	Tue Apr 24 16:52:25 2012 +0200
     1.2 +++ b/ch03.roff	Tue Apr 24 18:02:08 2012 +0200
     1.3 @@ -291,8 +291,94 @@
     1.4  
     1.5  .H1 "MH Directory Split
     1.6  .P
     1.7 -Historically, a personal MH setup had consisted of two things:
     1.8 -the 
     1.9 +In MH and nmh, a personal setup had consisted of two parts:
    1.10 +The MH profile, named
    1.11 +.Fn \&.mh_profile
    1.12 +and being located directly in the user's home directory.
    1.13 +And the MH directory, where all his mail messages and also his personal
    1.14 +forms, scan formats, other configuration files are stored. The location
    1.15 +of this directory could be user-chosen. The default was to name it
    1.16 +.Fn Mail
    1.17 +and have it directly in the home directory.
    1.18 +.P
    1.19 +I've never liked the data storage and the configuration to be intermixed.
    1.20 +They are different kinds of data. One part, are the messages,
    1.21 +which are the data to operate on. The other part, are the personal
    1.22 +configuration files, which are able to change the behavior of the operations.
    1.23 +The actual operations are defined in the profile, however.
    1.24 +.P
    1.25 +When storing data, one should try to group data by its type.
    1.26 +There's sense in the Unix file system hierarchy, where configuration
    1.27 +file are stored separate (\c
    1.28 +.Fn /etc )
    1.29 +to the programs (\c
    1.30 +.Fn /bin
    1.31 +and
    1.32 +.Fn /usr/bin )
    1.33 +to their sources (\c
    1.34 +.Fn /usr/src ).
    1.35 +Such separation eases the backup management, for instance.
    1.36 +.P
    1.37 +In mmh, I've reorganized the file locations.
    1.38 +Still there are two places:
    1.39 +There's the mail storage directory, which, like in MH, contains all the
    1.40 +messages, but, unlike in MH, nothing else.
    1.41 +Its location still is user-chosen, with the default name
    1.42 +.Fn Mail ,
    1.43 +in the user's home directory. This is much similar to the case in nmh.
    1.44 +The configuration files, however, are grouped together in the new directory
    1.45 +.Fn \&.mmh
    1.46 +in the user's home directory.
    1.47 +The user's profile now is a file, named
    1.48 +.Fn profile ,
    1.49 +in this mmh directory.
    1.50 +Consistently, the context file and all the personal forms, scan formats,
    1.51 +and the like, are also there.
    1.52 +.P
    1.53 +The naming changed with the relocation.
    1.54 +The directory where everything, except the profile, had been stored (\c
    1.55 +.Fn $HOME/Mail ),
    1.56 +used to be called \fIMH directory\fP. Now, this directory is called the
    1.57 +user's \fImail storage\fP. The name \fImmh directory\fP is now given to
    1.58 +the new directory
    1.59 +(\c
    1.60 +.Fn $HOME/.mmh ),
    1.61 +containing all the personal configuration files.
    1.62 +.P
    1.63 +The separation of the files by type of content is logical and convenient.
    1.64 +There are no functional differences as any possible setup known to me
    1.65 +can be implemented with both approaches, although likely a bit easier
    1.66 +with the new approach. The main goal of the change had been to provide
    1.67 +sensible storage locations for any type of personal mmh file.
    1.68 +.P
    1.69 +In order for one user to have multiple MH setups, he can use the
    1.70 +environment variable
    1.71 +.Ev MH
    1.72 +the point to a different profile file.
    1.73 +The MH directory (mail storage plus personal configuration files) is
    1.74 +defined by the
    1.75 +.Pe Path
    1.76 +profile entry.
    1.77 +The context file could be defined by the
    1.78 +.Pe context
    1.79 +profile entry or by the
    1.80 +.Ev MHCONTEXT
    1.81 +environment variable.
    1.82 +The latter is useful to have a distinct context (e.g. current folders)
    1.83 +in each terminal window, for instance.
    1.84 +In mmh, there are three environment variables now.
    1.85 +.Ev MMH
    1.86 +may be used to change the location of the mmh directory.
    1.87 +.Ev MMHP
    1.88 +and
    1.89 +.Ev MMHC
    1.90 +change the profile and context files, respectively.
    1.91 +Besides providing a more consistent feel (which simply is the result
    1.92 +of being designed anew), the set of personal configuration files can
    1.93 +be chosen independently from the profile (including mail storage location)
    1.94 +and context, now. Being it relevant for practical use or not, it
    1.95 +de-facto is an improvement. However, the main achievement is the
    1.96 +split between mail storage and personal configuration files.
    1.97  
    1.98  
    1.99  .H1 "Path Notations