# HG changeset patch # User markus schnalke # Date 1335283328 -7200 # Node ID ab5253e48c7483ca17f5fc937488d8decccb751f # Parent db3567c9cc3f6e053306dc8e9918e5f4646e7c1b Wrote about the directory split. style: New macro for env vars. diff -r db3567c9cc3f -r ab5253e48c74 ch03.roff --- a/ch03.roff Tue Apr 24 16:52:25 2012 +0200 +++ b/ch03.roff Tue Apr 24 18:02:08 2012 +0200 @@ -291,8 +291,94 @@ .H1 "MH Directory Split .P -Historically, a personal MH setup had consisted of two things: -the +In MH and nmh, a personal setup had consisted of two parts: +The MH profile, named +.Fn \&.mh_profile +and being located directly in the user's home directory. +And the MH directory, where all his mail messages and also his personal +forms, scan formats, other configuration files are stored. The location +of this directory could be user-chosen. The default was to name it +.Fn Mail +and have it directly in the home directory. +.P +I've never liked the data storage and the configuration to be intermixed. +They are different kinds of data. One part, are the messages, +which are the data to operate on. The other part, are the personal +configuration files, which are able to change the behavior of the operations. +The actual operations are defined in the profile, however. +.P +When storing data, one should try to group data by its type. +There's sense in the Unix file system hierarchy, where configuration +file are stored separate (\c +.Fn /etc ) +to the programs (\c +.Fn /bin +and +.Fn /usr/bin ) +to their sources (\c +.Fn /usr/src ). +Such separation eases the backup management, for instance. +.P +In mmh, I've reorganized the file locations. +Still there are two places: +There's the mail storage directory, which, like in MH, contains all the +messages, but, unlike in MH, nothing else. +Its location still is user-chosen, with the default name +.Fn Mail , +in the user's home directory. This is much similar to the case in nmh. +The configuration files, however, are grouped together in the new directory +.Fn \&.mmh +in the user's home directory. +The user's profile now is a file, named +.Fn profile , +in this mmh directory. +Consistently, the context file and all the personal forms, scan formats, +and the like, are also there. +.P +The naming changed with the relocation. +The directory where everything, except the profile, had been stored (\c +.Fn $HOME/Mail ), +used to be called \fIMH directory\fP. Now, this directory is called the +user's \fImail storage\fP. The name \fImmh directory\fP is now given to +the new directory +(\c +.Fn $HOME/.mmh ), +containing all the personal configuration files. +.P +The separation of the files by type of content is logical and convenient. +There are no functional differences as any possible setup known to me +can be implemented with both approaches, although likely a bit easier +with the new approach. The main goal of the change had been to provide +sensible storage locations for any type of personal mmh file. +.P +In order for one user to have multiple MH setups, he can use the +environment variable +.Ev MH +the point to a different profile file. +The MH directory (mail storage plus personal configuration files) is +defined by the +.Pe Path +profile entry. +The context file could be defined by the +.Pe context +profile entry or by the +.Ev MHCONTEXT +environment variable. +The latter is useful to have a distinct context (e.g. current folders) +in each terminal window, for instance. +In mmh, there are three environment variables now. +.Ev MMH +may be used to change the location of the mmh directory. +.Ev MMHP +and +.Ev MMHC +change the profile and context files, respectively. +Besides providing a more consistent feel (which simply is the result +of being designed anew), the set of personal configuration files can +be chosen independently from the profile (including mail storage location) +and context, now. Being it relevant for practical use or not, it +de-facto is an improvement. However, the main achievement is the +split between mail storage and personal configuration files. .H1 "Path Notations diff -r db3567c9cc3f -r ab5253e48c74 style --- a/style Tue Apr 24 16:52:25 2012 +0200 +++ b/style Tue Apr 24 18:02:08 2012 +0200 @@ -231,6 +231,9 @@ .de Fu \" function .CW "\\$1" "\\$2 .. +.de Ev \" env variable +.CW "\\$1" "\\$2 +.. .de Cl \" command line `\c .CW "\\$1" "'\\$2