Upgrading Leo from 6.1 to 6.3 - my oh my

66 views
Skip to first unread message

poseidon

unread,
Dec 13, 2020, 8:08:35 AM12/13/20
to leo-editor
Dear Leo team,


I upgraded Leo from 6.1 to 6.3. As a result I couldn't recognize my Leo anymore, everything different, all my settings seemed gone. Simply opening myLeoSettings seemed to help, but that change wasn't persistent after closing Leo.

So I decided to remove Leo, remove ~/.leo and install Leo again, a fresh install. Leo created ~/.leo and therein a default myLeoSettings.leo. As that file contained almost nothing I copied /usr/lib/python3.9/site-packages/leo/config/leoSettings.leo to ~/.leo/myLeoSettings.leo.

Next, leo started and looked as expected - dark theme, well... . But when I opened myLeoSettings from the menu Settings, the theme changed from the default dark theme to *the* light one, which I'm used with Leo since 2003. Good, but why is this? I didn't change anything yet!

Ok, close Leo and start again. Again, a dark theme. Open myLeoSettings to change a few things: Fonts. Change fonts. Reload settings. Fonts dont't change. Restart Leo. Dark theme, no change in font size. Open myLeosettings. Light theme. Fonts changed as expected.

Any idea, what's going on?


Another, but minor one: On my machine the log says, after Leo has started (real user name replaced by 'XXX'):
    
Leo Log Window
Leo 6.3
Python 3.9.0, PyQt version 5.15.2
linux
setting leoID from os.getenv('USER'): 'XXX'
current dir: /home/XXX
load dir: /usr/lib/python3.9/site-packages/leo/core
global config dir: /usr/lib/python3.9/site-packages/leo/config
home dir: /home/XXX
reading settings in /usr/lib/python3.9/site-packages/leo/config/leoSettings.leo
reading settings in /home/XXX/.leo/myLeoSettings.leo
reading settings in /home/XXX/atlantis.leo
reading settings in /usr/lib/python3.9/site-packages/leo/themes/DefaultTheme.leo
reading settings in /home/XXX/atlantis.leo
read 14 files in 3.17 seconds
read outline in 4.11 seconds

Why does Leo look for settings in my workbook twice?

Cheers
Paul

P.S.: I'm on Arch Linux, everything up to date.

Edward K. Ream

unread,
Dec 13, 2020, 9:46:27 AM12/13/20
to leo-editor
On Sun, Dec 13, 2020 at 7:08 AM poseidon <f...@fhv.at> wrote:

> I upgraded Leo from 6.1 to 6.3. As a result I couldn't recognize my Leo anymore, everything different, all my settings seemed gone. Simply opening myLeoSettings seemed to help, but that change wasn't persistent after closing Leo.

First, my apologies for the trouble you are having.

[big snip]
> Any idea, what's going on?

Perhaps Leo isn't finding your myLeoSettings.leo.  See below.

> Why does Leo look for settings in my workbook twice?

When I open Leo, the log pane contains this (among other things):

reading settings in C:/leo.repo/leo-editor/leo/config/leoSettings.leo
reading settings in C:/Users/edreamleo/.leo/myLeoSettings.leo
reading settings in c:/leo.repo/leo-editor/leo/core/leoPy.leo (read file for settings)
reading settings in C:/Users/edreamleo/.leo/EKRWindowsDark.leo
reading settings in c:/leo.repo/leo-editor/leo/core/leoPy.leo (reread the file)

Yes, that's right. After reading the settings files, Leo re-reads the .leo files that appear on the command line. This ensures that all settings are properly applied.

My advice

1. Make sure Leo is loading the correct copy of myLeoSettings.leo. This page tells where Leo looks for settings files.

2. Once you know that Leo is loading the right myLeoSettings.leo file, make a copy of your old myLeoSettings.leo file, and remove all the settings for the "active" myLeoSettings.leo file.

3. Don't open myLeoSettings.leo in addition to other files. That will just confuse you.

4. Now you can run some experiments:

A. Open myLeoSettings.leo all by itself.
B. Open some other file, say x.leo with Leo, all by itself, just to see what x.leo looks like.
C. Change myLeoSettings.leo.
D. Close x.leo and reopen x.leo.

Repeat until x.leo looks right.

HTH. Please feel free to ask more questions.

Edward

poseidon

unread,
Dec 13, 2020, 1:51:25 PM12/13/20
to leo-editor
Thank you, Edward!

myLeoSettings.leo is the only myLeoSettings.leo on my machine.

Well, after playing around I found out that replacing DefaultTheme by None in my settings did the trick. This means, that themes change font settings and the like, too. Checked that by inspecting themes files (e.g. EKRLight.leo). Makes sense, but then, why having those settings in myLeoSettings as well? This makes the whole config'ing of Leo rather complex, doesn't it?

Cheers
Paul, being happy again for now :-)

poseidon

unread,
Dec 13, 2020, 2:11:41 PM12/13/20
to leo-editor
Hm, another one, sorry: When I hover in the outline pane, after about a second a black rectangle appears with the text I'm hovering on, repeating that very text but in white font colour. Searched for "tip" (hoping to find tooltips, tool-tips, tool tips or the like), but cannot figure how to stop this, as there's no added value to repeat the text in a different colour I already see in the outline pane.

Cheers
Paul

poseidon

unread,
Dec 13, 2020, 2:29:17 PM12/13/20
to leo-editor
Just curious: What happened to the right-click menu showing 5 checkboxes named Render, Body, Tabs, IconBar, Minibuffer? When I right-click in the gui only IconBar is still there.

More important: How can I move the log window out of the outline pane over to the body pane? I like the ouline pane spreading out the whole hight of the monitor. But now, if the log pane grows, the outline pane shrinks. I's prefer the body pane shrink to see the log.

Cheers
Paul

tbp1...@gmail.com

unread,
Dec 13, 2020, 6:20:07 PM12/13/20
to leo-editor
I learned that some GUI settings left over from years ago still have an effect if I'm not using a theme.  And sometimes those settings and the theme don't play together well.  OTOH, I'm not using a theme just now because there are a few things I don't like in the current dark theme but I haven't figured out what to change to fix them.  My old settings give me an appearance I like (though it's not a dark theme), so I'm sticking with them for now.

Edward K. Ream

unread,
Dec 14, 2020, 6:44:05 AM12/14/20
to leo-editor
On Sun, Dec 13, 2020 at 12:51 PM poseidon <f...@fhv.at> wrote:
Thank you, Edward!

You're welcome. I'm glad you found a solution.

Well, after playing around I found out that replacing DefaultTheme by None in my settings did the trick. This means, that themes change font settings and the like, too. Checked that by inspecting themes files (e.g. EKRLight.leo). Makes sense, but then, why having those settings in myLeoSettings as well? This makes the whole config'ing of Leo rather complex, doesn't it?

Too complex :-) There are several reasons for the complexity:

- Power: Leo allows per-file (.leo file) settings.
- History: Themes were a late graft on existing settings.
- Qt: Qt settings are a mishmash of style-sheets and programmatic options.

So now we're kinda stuck. Nobody wants to change leoSettings.leo unnecessarily. Once things work, all of us, including you, just want to move on ;-)

Would I change things if I were designing settings from scratch? Maybe, but that's a moot point.

I do know that Félix's Leo plugin for vs-code will use vs-code's settings machinery. That's perfectly appropriate. Settings files are not the heart of Leo.

Edward

Edward K. Ream

unread,
Dec 14, 2020, 7:32:57 AM12/14/20
to leo-editor
On Sun, Dec 13, 2020 at 1:29 PM poseidon <f...@fhv.at> wrote:
Just curious: What happened to the right-click menu showing 5 checkboxes named Render, Body, Tabs, IconBar, Minibuffer? When I right-click in the gui only IconBar is still there.

The contextmenu plugin is installed by default. It supports
@data contextmenu-commands
More important: How can I move the log window out of the outline pane over to the body pane? I like the ouline pane spreading out the whole hight of the monitor. But now, if the log pane grows, the outline pane shrinks. I's prefer the body pane shrink to see the log.

Try the toggle-split-direction command.

Edward

Edward K. Ream

unread,
Dec 14, 2020, 7:35:01 AM12/14/20
to leo-editor
On Sun, Dec 13, 2020 at 1:11 PM poseidon <f...@fhv.at> wrote:
Hm, another one, sorry: When I hover in the outline pane, after about a second a black rectangle appears with the text I'm hovering on, repeating that very text but in white font colour. Searched for "tip" (hoping to find tooltips, tool-tips, tool tips or the like), but cannot figure how to stop this, as there's no added value to repeat the text in a different colour I already see in the outline pane.

The "added value" happens only for very long headlines.

Looking at the code, qtree.drawNode, I see this is #1310. If the tooltip really bothers you we could add a setting. But this is low priority.

Heh, you could create a plugin that monkey-patches drawNode...

Edward
Message has been deleted

poseidon

unread,
Dec 14, 2020, 1:24:41 PM12/14/20
to leo-editor
Got it. Actually, I know this situation all too good...

Cheers Paul
Reply all
Reply to author
Forward
0 new messages