On Tuesday, August 27, 2019 at 1:29:25 PM UTC+2, btheado wrote:
>
> Vitalije,
>
> Could you explain more on how using Leo's reading code for both reading 
> outlines and reading settings is an obstacle to fixing some of your 
> complaints (i.e. switching a theme can't be done without restarting leo)?
>
>
Because collecting settings in Leo happens during the startup, it is tied 
to startup. It can't be executed outside the startup code. That is the main 
reason why many settings require Leo restart to see the change.

GUI code depends on settings and can't be instantiated without settings but 
some of the Leo reading code depends on GUI elements. That makes the 
initialization code very hard to understand and maintain. It is a bit like 
the question what comes before chicken or egg. 

At the beginning of this thread Edward wrote about his idea of introducing 
global settings. The need for this was caused because there was an issue in 
the startup code. It is not clear to me what it was supposed to do: to read 
theme file before user settings or the other way around. But it is hard 
problem to solve mainly because startup code is so entangled and complex.

Your idea mentions "compiling" the settings to a simpler format at time of 
> save. How does that help compared to "compiling" the settings to a simpler 
> format during leo init? And isn't leo's reading of settings from outlines 
> into some internal data structure also a form of "compiling" the settings 
> to an alternate format? Is it that Leo's internal configuration structure 
> doesn't match what you want or is the the reading from outlines alone which 
> causes your complaint? Or both?
>
>
Main issue is using reading code for collecting settings. Changing this 
won't immediately solve my troubles with the settings, but it would allow 
simplifications in the startup code and that could lead to reducing number 
of bugs in the user preferences related code. Using reading outline code 
before fully initialized Leo is like creating a bike in two steps: first 
you attach one wheel to frame and then riding on one wheel to the store to 
buy the second wheel and other parts necessary to complete the bike. It is 
possible to do so, Leo has proven this. But it isn't natural.

Vitalije

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2a036a74-ec50-44b8-b5b7-1761cae01772%40googlegroups.com.

Reply via email to