On Thu, Feb 9, 2012 at 11:06 AM, Edward K. Ream <[email protected]> wrote: > 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
Reacting according to _my_ Leo world view. I assume the existence of configDir/leoSettings.leo, but I would never consider configDir/myLeoSettings.leo, because if it's 'mine', what is it doing in Leo's source tree? Similarly, I've never considered a leoSettings.leo file outside Leo's source tree. So, I basically could eliminate the leoSettings/myLeoSettings dichotomy, if it's outside the leoConfig/ dir, it's 'mine'. So, to meet my needs, the search order could be when opening mydir/myfile.leo: - leoConfig/leoSettings.leo # Edward's settings - ~/.leo/leoSettings.leo # my system-wide settings - leoSettings.leo in mydir/ # settings specific to this 'flavor' of Leo - a file pointed to by -c <configfile> on the command line - @settings node in myfile.leo # this file only In theory a /etc/leo/leoSettings.leo file would be appropriate, doubtful in practice. > > This might be true for the first local file being loaded, So, 'first' is the file on the command line, 'not first' are files opened via menu File -> Open ... ? I would be ok if files opened from inside a Leo instance only considered settings contained in the file being opened. The limitations of previous statement would be mitigated if Leo implemented native 'sessions' or 'projects' wherein I could call Leo with a session name, the session consisting of the names and current nodes of a set of Leo files. Thanks, Kent 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. > -- 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.
