I don't know any other way. Perhaps there is another and maybe even better way, but I can't imagine it. At present Leo uses same code to read user document and to read settings files. One of the settings that is very important is enabled_plugins. It can be defined in leoSettings.leo, in myLeoSettings.leo, in <macinename>LeoSettings.leo, inside working folder in leoSettings.leo or even in user document. Leo can't be fully initialized without initializing plugins and it can't figure out what plugins to load until it has processed all possible settings documents. Leo needs all of its power to analyze outlines with settings, but all that power should be initialized first, and to fully initialize it, it needs settings data, so there we are at the beginning of a loop. It is amazing to see how it is all done, but to understand and be confident that you understand well what is going on is very hard. That is why I believe if Leo had access to settings data using some other method not its tree traversing and parsing abilities then init code could be much simpler.

I hope this makes sense.

Thanks for the thorough explanation. But you don't need a GUI app to read an XML, as you don't need a GUI app to read from an SQLite file. I understand that you need to read all the settings files to be able to fully initialize Leo, but you don't need (or should not need) al Leo's machinery to read the settings files. Even if they are .leo files. Clearly the part that needs to be changed is that "Leo needs all of its power to analyze outlines with settings". It may be the case at present, but it should not.

It should be possible to take the code which reads Leo files apart from the rest and see if there are parts in the settings that need a delayed evaluation (o some other kind of lazy evaluation) to succeed and decide on them on a case by case basis. It could even be handled with a dependency tree if needed, but it cannot be a closed loop.

I'm sorry I don't have the time at this moment to take a look at the initialization code to help further in this envdeavour, so you are in your right to ignore my comments completely and go on with the best solution you can achieve. But from an architectural point of view, the need to simplify the initialization code should not imply the need to change the form in which settings are stored.

Yours,
Xavier

--
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to