On Jan 14, 7:37 pm, "Edward K. Ream" <[email protected]> wrote: > On Jan 14, 11:05 am, "Edward K. Ream" <[email protected]> wrote: > > > This is a true horror show, created at the requests of various users. > > 2. Create a "horrible details" section that will explain what the > actual search table means. Something like:: > > 1. globalConfigDir/leoSettings.leo > 2. homeDir/leoSettings.leo > 3. g.app.loadDir/leoSettings.leo > 4. globalConfigDir/myLeoSettings.leo > 5. homeDir/myLeoSettings.leo > 6. machineDir/leoSettings.leo > 7. g.app.loadDir/myLeoSettings.leo > 8. <the file specified in the -c command-line option> > 9. <x.leo, the file being loaded> > > I'd call it the 8-fold way, but there are 9 folds. > > I shall then explain how Leo computes globalConfigDir, homeDir, > g.app.loadDir and (oh horror) machineDir. Each of these directories > will require at least a full paragraph. > Not fun, but it should be comprehensible. > > Edward
This is the simplification I can see here. So, I will rely on 2 facts about app settings that work very well in the UNIX world: 1. global and user-specific app settings 2. the power of the command line This is the scenario I can imagine: 1. leo starts 2. If a file was passed via -c command line option, leo treats it as its settings file and loads the settings into a SETTINGS structure in memory. goto 5. 3. leo loads the globalConfigDir/leoSettings.leo (1. in the list, this is the file that ships with leo) into the SETTINGS structure. 4. If there is a ~/.leo/myLeoSettings.leo (I believe this is 5. in the list), leo "patches" those settings loaded during previous step if they are different. 5. leo loads all enabled plugins from SETTINGS. 6. leo loads an outline (9. in the list) 7. If it finds an @enabled-plugins node, it loads any plugins found there that are not already loaded. It doesn't touch any plugins that were already loaded previously. By following this scenario, leo users will be able to deal with such setups as: 1. "I'm perfectly happy with the default leo settings" - user just runs leo. 2. "I would like to have a different set of default leo settings" - user creates a copy of globalConfigDir/leoSettings.leo in ~/.leo, renames it to myLeoSettings.leo and hacks it accordingly. Note that settings in myLeoSettings.leo can be a subset of settings in leoSettings.leo, because that file is processed first anyway. If the user wants a different setting value for a certain setting, he just changes it in his ~/.leo/myLeoSettings.leo 3. "My custom default settings are cool. But I need a couple of different default settings, but I have only one ~/.leo/ myLeoSettings.leo file to play with.". - user creates copies of globalConfigDir/leoSettings.leo anywhere, edits them to suit his need, then passes them to leo at startup via command-line option -c. 4. "Now that I have a proper default settings setup, I'd like to be able to load a couple of additional plugins when I open a specific leo outline" - user just creates an @enabled-plugins node in his outline and specifies there the additional plugins that need to be loaded. 5. "I'm happy, but when I work with a certain outline, I don't need a certain plugin that was loaded using a set of default settings (see setups 1,2,3). Can I unload a specific plugin?" - user just creates one more file with specific leo settings (setup 3) (where he makes sure that the plugin he doesn't need is not loaded) and passes it to leo via command-line option -c. I hope that this post poured a bit of light instead of adding even more darkness to the discussed issue. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
