On Thu, Jan 15, 2009 at 11:05 AM, Edward K. Ream <[email protected]> wrote: > > > On Wed, Jan 14, 2009 at 9:42 AM, Kent Tenney <[email protected]> wrote: >> >> """ >> In the first case, Leo will use the last found @enabled-plugins node >> from the list list of settings files. As always, the search order for >> settings is: >> >> 1. leo/config/leoSettings.leo >> 2. ~/.leo/leoSettings.leo >> 3. leo/config/myLeoSettings.leo >> 4. ~/.leo/myLeoSettings.leo >> 5. x.leo >> """ >> >> I am using a file not mentioned in this list, the one I call >> <cwd>/myLeoSettings.leo >> it is the myLeoSettings.leo file which is in the same directory as x.leo > > The relevant method is readSettingsFiles in leoConfig.py. It uses the > following table: > > table = ( > (self.globalConfigFile,False), > (self.homeFile,False), > (localConfigFile,False), > (self.myGlobalConfigFile,False), > (self.myHomeConfigFile,False), > (self.machineConfigFile,False), > (myLocalConfigFile,False), > # New in Leo 4.6: the -c file is in *addition* to other config > files. > (g.app.oneConfigFilename,False), > (fileName,True), > > This corresponds, I think, to the following files: > > 1: [globalConfigFile] > 1a. sys.globalConfigDir/leoSettings.leo > 1b. leo/config.leoSettings.leo > 2. [homeFile] ~/leoSettings.leo > 3. [localConfiFile] xDir/leoSettings.leo where is the directory of x.leo > 4. [myGlobalConfigFile] > 4a. sys.globalConfigDir/myLeoSettings.leo > 4b. leo/config/myLeoSettings.leo > 5. [machineConfigFile] > Too horrible to describe. > See g.computeMachineDir and config.initSettingsFiles. > 6. [myLocalConfigFile] xDir/myLeoSettings.leo > 7. [g.app.oneConfigFile] The file specified in the -c option. > 8. [fileName] x.leo > > This is a true horror show, created at the requests of various users.
Aren't we a pain? I think you've spoiled us. :-] > > As a minor help, Leo announces three directories on startup: > > load dir: C:\leo.repo\trunk\leo\core > > global config dir: C:\leo.repo\trunk\leo\config > > home dir: C:\Documents and Settings\HP_Administrator\My Documents\Edward Even more helpful, it announces "reading settings in ..." > > Note, in particular, there is no such thing as <cwd>. You probably mean > g.app.loadDir. I use <cwd> as shorthand for <the directory where this Leo file lives> > > When in doubt, consult the code, namely: > > g.computeGlobalConfigDir > g.computeHomeDir > g.computeLeoDir > g.computeLoadDir > g.computeMachineDir > g.computeStandardDirectories > config.initSettingsFiles > config.readSettingsFiles > > In short, there is absolutely no way to make sense of all this. Even if you > could, you couldn't remember it for more than 5 minutes. It seems basically intuitive to me, configuration sources start as globally as possible and end as locally as possible leoConfig -> homeConfig->current dir->cmdlineSpecified->thisFile I think this is a standard idiom. My remark was only intended to suggest adding a missing file to the list in the doc, the one in the same directory as the Leo file being opened. (<loadDir>/myLeoSettings.leo) > > 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 -~----------~----~----~----~------~----~------~--~---
