On Wed, Jul 5, 2017 at 2:35 PM, vitalije <vitali...@gmail.com> wrote:
> Hi Xavier, > > >> ... it takes me to what could be a naive question from my part but, is it >> really impossible to simplify the init code without requiring the switch to >> sqlite-based settings? It seems strange to me that the access to those >> settings cannot be made *independent of the underlying source* by the >> use of an intermediate abstraction layer or proxy or whatever you call >> it... I mean that it should be possible to have also a real-time settings >> edition experience by editing Leo outlines, shouldn't it? >> > > 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. > Thanks for these remarks. You have provided more detail than I did. They are spot on (so far as I remember the details), and they discuss the heart of the matter. Nobody should pretend that init code is ever going to be easy. Edward -- 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.