comparison discussion.roff @ 126:3aafbd32d77b

Reworked the User Data Location (Separation) section.
author markus schnalke <meillo@marmaro.de>
date Sat, 30 Jun 2012 16:50:35 +0200
parents 0e102cec0c73
children 4a9a97d9d6b5
comparison
equal deleted inserted replaced
125:0e102cec0c73 126:3aafbd32d77b
3259 can be developed to allow automated testing at compile time. 3259 can be developed to allow automated testing at compile time.
3260 3260
3261 3261
3262 3262
3263 3263
3264 .H2 "Separation 3264 .H2 "User Data Locations
3265 3265 .P
3266 .U3 "MH Directory Split 3266 In nmh, a personal setup consists of the MH profile and the MH directory.
3267 .P 3267 The profile is a file named
3268 In MH and nmh, a personal setup had consisted of two parts:
3269 The MH profile, named
3270 .Fn \&.mh_profile 3268 .Fn \&.mh_profile
3271 and being located directly in the user's home directory. 3269 in the user's home directory.
3272 And the MH directory, where all his mail messages and also his personal 3270 It contains the static configuration.
3273 forms, scan formats, other configuration files are stored. 3271 It also contains the location of the MH directory in the profile entry
3274 The location 3272 .Pe Path .
3275 of this directory could be user-chosen. 3273 The MH directory contains the mail storage and is the first
3276 The default was to name it 3274 place to search for personal forms, scan formats, and similar
3275 configuration files.
3276 The location of the MH directory can be chosen freely by the user.
3277 The default and usual name is a directory named
3277 .Fn Mail 3278 .Fn Mail
3278 and have it directly in the home directory. 3279 in the home directory.
3279 .P 3280 .P
3280 I've never liked the data storage and the configuration to be intermixed. 3281 The way MH data is splitted between profile and MH directory is a legacy.
3281 They are different kinds of data. 3282 It is only sensible in a situation where the profile is the only
3282 One part, are the messages, 3283 configuration file.
3283 which are the data to operate on. 3284 Why else should the mail storage and the configuration files be intermixed?
3284 The other part, are the personal 3285 They are different kinds of data:
3285 configuration files, which are able to change the behavior of the operations. 3286 The data to be operated on and the configuration to change how
3286 The actual operations are defined in the profile, however. 3287 tools operate.
3287 .P 3288 Splitting the configuration between the profile and the MH directory
3288 When storing data, one should try to group data by its type. 3289 is bad.
3289 There's sense in the Unix file system hierarchy, where configuration 3290 Merging the mail storage and the configuration in one directory is bad
3290 file are stored separate (\c 3291 as well.
3291 .Fn /etc ) 3292 As the mail storage and the configuration were not separated sensibly
3292 to the programs (\c 3293 in the first place, I did it now.
3293 .Fn /bin 3294 .P
3294 and 3295 Personal mmh data is grouped by type, resulting in two distinct parts:
3295 .Fn /usr/bin ) 3296 The mail storage and the configuration.
3296 to their sources (\c 3297 In mmh, the mail storage directory still contains all the messages,
3297 .Fn /usr/src ). 3298 but, in exception of public sequences files, nothing else.
3298 Such separation eases the backup management, for instance. 3299 In difference to nmh, the auxiliary configuration files are no longer
3299 .P 3300 located there.
3300 In mmh, I've reorganized the file locations. 3301 Therefore, the directory is no longer called the user's \fIMH directory\fP
3301 Still there are two places: 3302 but his \fImail storage\fP.
3302 There's the mail storage directory, which, like in MH, contains all the 3303 Its location is still user-chosen, with the default name
3303 messages, but, unlike in MH, nothing else.
3304 Its location still is user-chosen, with the default name
3305 .Fn Mail , 3304 .Fn Mail ,
3306 in the user's home directory. 3305 in the user's home directory.
3307 This is much similar to the case in nmh. 3306 In mmh, the configuration is grouped together in
3308 The configuration files, however, are grouped together in the new directory 3307 the hidden directory
3309 .Fn \&.mmh 3308 .Fn \&.mmh
3310 in the user's home directory. 3309 in the user's home directory.
3311 The user's profile now is a file, named 3310 This \fImmh directory\fP contains the context file, personal forms,
3312 .Fn profile , 3311 scan formats, and the like, but also the user's profile, now named
3313 in this mmh directory. 3312 .Fn profile .
3314 Consistently, the context file and all the personal forms, scan formats, 3313 The location of the profile is no longer fixed to
3315 and the like, are also there. 3314 .Fn $HOME/.mh_profile
3316 .P 3315 but to
3317 The naming changed with the relocation. 3316 .Fn $HOME/.mmh/profile .
3318 The directory where everything, except the profile, had been stored (\c 3317 Having both, the file
3319 .Fn $HOME/Mail ), 3318 .Fn $HOME/.mh_profile
3320 used to be called \fIMH directory\fP. 3319 and the configuration directory
3321 Now, this directory is called the 3320 .Fn $HOME/.mmh
3322 user's \fImail storage\fP. 3321 appeared to be inconsistent.
3323 The name \fImmh directory\fP is now given to 3322 The approach chosen for mmh is consistent, simple, and familiar to
3324 the new directory 3323 Unix users.
3325 (\c 3324 .P
3326 .Fn $HOME/.mmh ), 3325 MH allows users to have multiiple MH setups.
3327 containing all the personal configuration files. 3326 Therefore, it is necessary to select a different profile.
3328 .P 3327 The profile is the single entry point to access the rest of a
3329 The separation of the files by type of content is logical and convenient. 3328 personal MH setup.
3330 There are no functional differences as any possible setup known to me 3329 In nmh, the environment variable
3331 can be implemented with both approaches, although likely a bit easier
3332 with the new approach.
3333 The main goal of the change had been to provide
3334 sensible storage locations for any type of personal mmh file.
3335 .P
3336 In order for one user to have multiple MH setups, he can use the
3337 environment variable
3338 .Ev MH 3330 .Ev MH
3339 the point to a different profile file. 3331 could be used to specifiy a different profile.
3340 The MH directory (mail storage plus personal configuration files) is 3332 To operate in the same MH setup with a separate context,
3341 defined by the 3333 the
3342 .Pe Path
3343 profile entry.
3344 The context file could be defined by the
3345 .Pe context
3346 profile entry or by the
3347 .Ev MHCONTEXT 3334 .Ev MHCONTEXT
3348 environment variable. 3335 environment variable could be used.
3349 The latter is useful to have a distinct context (e.g. current folders) 3336 This allows having own current folders and current messages in
3350 in each terminal window, for instance. 3337 each terminal, for instance.
3351 In mmh, there are three environment variables now. 3338 In mmh, three environment variables are used.
3352 .Ev MMH 3339 .Ev MMH
3353 may be used to change the location of the mmh directory. 3340 overrides the default location of the mmh directory (\c
3341 .Fn .mmh ).
3354 .Ev MMHP 3342 .Ev MMHP
3355 and 3343 and
3356 .Ev MMHC 3344 .Ev MMHC
3357 change the profile and context files, respectively. 3345 override the paths to the profile and context files, respectively.
3358 Besides providing a more consistent feel (which simply is the result 3346 This approach allows the set of personal configuration files to be chosen
3359 of being designed anew), the set of personal configuration files can 3347 independently from the profile, context, and mail storage.
3360 be chosen independently from the profile (including mail storage location) 3348 .P
3361 and context, now. 3349 The separation of the files by type is sensible and convenient.
3362 Being it relevant for practical use or not, it 3350 The new approach has no functional disadvantages,
3363 de-facto is an improvement. 3351 as every setup I can imagine can be implemented with both approaches,
3364 However, the main achievement is the 3352 possibly even easier with the new approach.
3365 split between mail storage and personal configuration files. 3353 The main achievement of the change is the clear and sensible split
3366 3354 between mail storage and configuration.
3367 3355
3368 3356
3369 3357
3370 3358
3371 3359