On Feb 9, 7:39 am, "Edward K. Ream" <[email protected]> wrote:
> Leo's startup code is extremely complex.  It is becoming urgent to simplify 
> it.

There is a buglet involving the computation of the location of
leoSettings.leo and myLeoSettings.leo that I would like to fix.

Kent, and others interested in "creative" settings please take note.

Supposedly, the rules for finding settings files are at:
http://webpages.charter.net/edreamleo/customizing.html#search-order-for-settings-files
Here they are:

QQQQQ
When reading a .leo file, Leo looks for settings in default settings
files first, then settings in personal settings files, and finally
settings in local settings files. The exact search order is:

    Default settings files:
        configDir/leoSettings.leo
        homeDir/leoSettings.leo
        localDir/leoSettings.leo
    Personal settings files:
        configDir/myLeoSettings.leo
        homeDir/myLeoSettings.leo
        homeDir/<machine-name>LeoSettings.leo (note capitalization)
        localDir/myLeoSettings.leo
    Local settings files:
        The file specified by the -c command-line option.
        The file being loaded.
QQQQQ

This might be true for the first local file being loaded, but I
*think* that what happens for all other .leo files is that the
settings in the previously-found leoSettings.leo and myLeoSettings.leo
files are used *without* searching again for leoSettings.leo and
myLeoSettings.leo.

So it looks like the settings in effect for a particular local file
could depend on whether that file was loaded first or not.

Imo, searching localDir for settings is a good recipe for confusion.
Otoh, Kent may have made a (strong?) case for settings files in the
local directory (the directory containing the .leo file being loaded,
or rather the *first* .leo file being loaded).

But it seems hard to believe that the combination of settings files in
the home directory, plus the -c option, isn't sufficient to handle
just about any conceivable need.  Furthermore, leoSettings.leo and
myLeoSettings.leo will be loaded from the local directory only if they
don't exist anywhere else.  How likely is that?  I always like to
avoid extremely rare cases: the confusion can be extreme when they
actually do happen.

Also, it should be made absolutely clear that Leo will load
leoSettings.leo and myLeoSettings.leo at most once.

Comments welcome, Amigos.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to