LeoInteg 1.0.8 released! Major bug fixes and features update!

126 views
Skip to first unread message

Félix

unread,
Sep 27, 2022, 11:39:46 PM9/27/22
to leo-editor
leointeg108banner.png
Major stability improvements, new features, and a complete U.I. command access redesign.  
...The biggest LeoInteg update ever! Make sure to update your Leo installation to 6.7 🦁 

LeoInteg 1.0.8 new features and bugfixes overview:

- Complete tree-outline logic re-write: Fixed stability issues when browsing 'somewhat large' outlines. You can now navigate rapidly in any outline, with mouse or keyboard, without tree rendering problems.

- Body pane has faster transition when simply navigating, without any flickering, and very reduced flickering after navigating away from a modified body pane.

- External file refreshes, and many other commands, now do not change the cursor / focus location, nor do they force-open the outline or body pane. This gets rid of the 'surprise' of having the outline or body pane popup, and having your cursor change place "unexpectedly". (Note that voluntarily navigating the outline will force-open the body pane to show the selected node's body.)
detect-external-focus.gif

- A new 'Undo panel' allowing to view the actual "past-actions" stack, -similar to photoshop's 'history' view, indicating the current position in the stack (if any 'undo' were performed) along with a right-click context command to directly change the state of the outline to be of a particular past 'undo' state.
undopanel.png

- The 'nav' search output panel: the goto pane, now supports browsing it's results with the keyboard arrows and pgUp/pgDn keys, highlighting the selected outline node for headline-matches, or body pane selection for body-pane matches, leaving the focus in the goto pane.
goto-pane-demo.gif

- Minibuffer now offers 'history' of past commands issued via the minibuffer, similar to leo's 'up arrow' usage in the minibuffer prompt.
minibuffer.png

- Commands icons above the body pane and outline are not configurable anymore, but have been expanded and carefully curated
outlinepane.png

- The body pane also has more common commands available in it's last icon (the three dots button).
bodypane.png

-Fixed many bugs (see changelog) and many other small issues not listed in the changelog.

Known issues: Extension is has large file size due to a sub-optimal webpack configuration of the welcome-settings page. It will be fixed in the next update, making leoInteg much lighter.

If you had tried LeoInteg before and found it to be improper for general usage, please try it again with this new 1.0.8 version!

Thanks to Edward, and all Leonistas, ;) 

Specially those who have tried LeoInteg and gave critical feedback! 

Many thanks again to you all!

Félix




Edward K. Ream

unread,
Sep 28, 2022, 5:55:20 AM9/28/22
to leo-editor
On Tuesday, September 27, 2022 at 10:39:46 PM UTC-5 Félix wrote:

...The biggest LeoInteg update ever! 

 Congratulations! vs-code updated leoInteg automagically. Everything looks good.

I am going to try leoInteg for my study of ocaml and mypy.

Edward

jkn

unread,
Sep 28, 2022, 10:17:15 AM9/28/22
to leo-editor
Hi Felix
    do you know if there are any issues in installing LeoInteg with VScodium
(https://github.com/VSCodium/vscodium,build of VSCode without tracking etc. )?

I am very much a novice with VSCode/Vscodium; I tried CTRL+P and
"ext install boltex.leointeg", but get an error "Server returned 500"

I have successfully installed a couple of VSCode plugins to VSCode, but I
don't know how much can be assumed...

Thanks very much, J^n

Félix

unread,
Sep 28, 2022, 8:44:30 PM9/28/22
to leo-editor
There were problems with microsoft's server last night, so you might want to retry this.

Also, you can download the extension itself t https://marketplace.visualstudio.com/items?itemName=boltex.leointeg 
use the link on the right (see below "Download Extension") 
Screenshot from 2022-09-28 20-37-43.png
And then user the command palette Ctrl+shit+P for the command "install from vsix"
Screenshot from 2022-09-28 20-40-15.png
And then browse to the leointeg  VSIX extension file you've just downloaded 

Hope this helps for installing on VScodium! Please share a screenshot when using it under this editor if it works! I'd be amazed to see it!!

Thanks again for trying out LeoInteg and giving feedback!!!

Félix

jkn

unread,
Sep 29, 2022, 2:45:40 AM9/29/22
to leo-editor
Thanks Felix, useful info about the server.

I think I installed an earlier version 'directly' like you suggest here, but thought I'd try the 'seamless' method this time round.

Happy to give it another go!

Regard,s J^n

Félix

unread,
Sep 29, 2022, 3:07:10 PM9/29/22
to leo-editor
Thanks J^n ! 

Please post a screenshot of vscodium running leointeg if you feel like it! i'm curious to see how other people use it (on various plat form and editors! )

Thanks again! :)

Félix

jkn

unread,
Sep 30, 2022, 6:18:00 AM9/30/22
to leo-editor

Hi Félix

I made some progress: one one laptop, I managed to get things running using the 'direct install from vix'
approach. My main issue was actually upgrading my python to >3.9 so I could use a recent version of Leo...

On my main desktop machine I seem to be having a little more trouble. I am already running python 3.10.
After starting/connecting to server etc, when loading a .leo file I get the following
(extracted from VSCodium output window):

Thanks & Regards, Jon N

Launching server with command: python3 /home/jkn/leo-editor/leo/core/leoserver.py --port 32125

Starting LeoBridge Server 1.0.4 (Launch with -h for help)
can not import leo.plugins.importers.occam        # JKN comment - not currently relevant I think
can not import leo.plugins.importers.occam
LeoServer: init leoBridge in 0.21 sec.
LeoBridge started at localhost on port: 32125.
Ctrl+c to break
server: User Connected, Total: 1, Limit: 1
Leo 6.7.0, 6.7.0 branch, build 4ef27fec07
2022-09-26 04:42:19 -0500
Python 3.10.6, LeoGui: dummy version
linux


server: Unexpected Exception! 'NoneType' object has no attribute 'frame'
Traceback (most recent call last):
  File "/home/jkn/leo-editor/leo/core/leoserver.py", line 5178, in ws_handler
    answer = controller._do_message(d)
  File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4467, in _do_message
    result = func(action, param)
  File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4483, in _do_server_command
    return func(param)
  File "/home/jkn/leo-editor/leo/core/leoserver.py", line 1193, in open_file
    c = self.bridge.openLeoFile(filename)
  File "/home/jkn/leo-editor/leo/core/leoBridge.py", line 302, in openLeoFile
    g.app.windowList.append(c.frame)
AttributeError: 'NoneType' object has no attribute 'frame'


server connection finished.  Total: 0, Limit: 1
Shutting down leoserver
Closing Leo Server
Checking for changed commanders...
Stopped leobridge server

Félix

unread,
Sep 30, 2022, 4:26:04 PM9/30/22
to leo-editor
Hmm.. that's weird... from your error message, it's in "leobridge" that it fails, not in "leoserver".. i started a little investigation...:

Only difference i can see (other than some plugins that could mess things up) is that you're on linux+python 3.10.6 while I'm on linux and python 3.9

So i tried updating to python 3.10. (that gave me python 3.10.7 instead of your 3.10.6)

so opening files with 3.10.7 on linux worked for me...! here's my output: 

Launching server with command: python3.10 /home/felix/leo-editor/leo/core/leoserver.py --port 32125

Starting LeoBridge Server 1.0.4 (Launch with -h for help)
LeoServer: init leoBridge in 0.94 sec.
LeoBridge started at localhost on port: 32125.
Ctrl+c to break
server: User Connected, Total: 1, Limit: 1
Leo 6.7.0, master branch, build 4ef27fec07
2022-09-26 04:42:19 -0500
Python 3.10.7, LeoGui: dummy version
linux
read outline in 0.14 seconds
updating: @clean src/leoIntegration.ts
read 37 files in 0.70 seconds
read outline in 0.88 seconds
read outline in 0.00 seconds
read 1 files in 0.00 seconds
read outline in 0.01 seconds

Some things to test: 
 - Does regular Leo open your same Leo file without problem?
 - Maybe try to upgrade to python 3.10.7 (from your 3.10.6) 
 - Maybe try to open some other Leo files, (do 'all' simple Leo files fail on opening? or just a particular one?)  .. or do 'new Leo file' add to it, ,  save it , then close and reopen it to see if it fails.
 - Maybe try to switch your leo install to the real  'master' branch instead of the pre-release '6.7.0' development version, which may have last-minute defects.

If you can open some other smaller/simpler leo files: (IF it does not contain personal/touchy information) Can you post you Leo file that you tried to open that failed? (dont bother if you cannot even open a simple test leo file with 'vanilla' content like a couple nodes with simple text in body of nodes)

Thanks for helping me debugging this weird failure of opening a Leo file with leointeg! ( no pressure! ;) )

Félix

Thomas Passin

unread,
Sep 30, 2022, 4:39:39 PM9/30/22
to leo-editor
Apart from why this isn't working, it looks like the bridge should guard against receiving None here when it expected to get an actual commander; and an error message could be output as well.

Félix

unread,
Sep 30, 2022, 4:59:21 PM9/30/22
to leo-editor
you're right. I'll try to discuss this with Edward to make leobridge more robust. (if the error is really about leobridge not handling something correctly under python 3.10.x)

Please keep me up to date with any of the suggestions I made in my previous answer. (checking if it does that while trying to open any  other/simpler Leo files) etc...

Félix

Edward K. Ream

unread,
Sep 30, 2022, 9:48:14 PM9/30/22
to leo-editor


On Friday, September 30, 2022 at 3:59:21 PM UTC-5 Félix wrote:
you're right. I'll try to discuss this with Edward to make leoBridge more robust. (if the error is really about leobridge not handling something correctly under python 3.10.x)

I've just taken a look at leoBridge.py.  The error likely arises because the bridge is trying to open a non-existent file. In that case, g.openWithFileName will return None.

PR #2900 prints an error message (instead of crashing) if the file does not exist.  I have not tested the code.

Please test the ekr-server-error-message branch and report whether the new code reports a missing file.  Thanks.

Edward

jkn

unread,
Oct 1, 2022, 5:33:31 AM10/1/22
to leo-editor
OK, a slight non-definitive update:

Without changing any SW, it looks like I may have (accidentally) been loading a totally empty old .leo file,
ie of 0 bytes length. I just picked this as an 'old, no-longer needed' test file, without looking
at the contents.

Leo itself doesn't seem to have an issue with opening this file, it creates a 'null' headline etc.

Might that have been the cause? I will try to take a better look later this w/end.

Thanks, J^n

Edward K. Ream

unread,
Oct 1, 2022, 9:07:33 AM10/1/22
to leo-e...@googlegroups.com
On Sat, Oct 1, 2022 at 4:33 AM jkn <jkn...@nicorp.f9.co.uk> wrote:
OK, a slight non-definitive update:

Without changing any SW, it looks like I may have (accidentally) been loading a totally empty old .leo file,
ie of 0 bytes length. I just picked this as an 'old, no-longer needed' test file, without looking
at the contents.

Leo itself doesn't seem to have an issue with opening this file, it creates a 'null' headline etc.

Looks like an edge case :-)  Have you had a chance to test PR #2900?

Edward

jkn

unread,
Oct 1, 2022, 9:36:00 AM10/1/22
to leo-editor
Not yet. How can I 'open a file' if it doesn't exist? ;-o

BTW, for me, with VSCodium (under LInux), the 'file open' etc. dialog doesn't appear on top
of the main screen; I have to ALT-TAB to get to it. This is nothing to do with LeoInteg,
but does this occur for anyone else? Kcould be KDE, I guess...

J^n

jkn

unread,
Oct 1, 2022, 11:14:34 AM10/1/22
to leo-editor
Hmm - with branch ekr-server-erro-message (and opening a file of zero bytes), I now get:

Launching server with command: python3 /home/jkn/leo-editor/leo/core/leoserver.py --port 32125

Starting LeoBridge Server 1.0.4 (Launch with -h for help)
can not import leo.plugins.importers.occam
can not import leo.plugins.importers.occam
LeoServer: init leoBridge in 0.21 sec.
LeoBridge started at localhost on port: 32125.
Ctrl+c to break
server: User Connected, Total: 1, Limit: 1
Leo 6.7.1-devel, ekr-server-error-message branch, build da0766f0cc
2022-09-30 20:44:52 -0500
Python 3.10.6, LeoGui: dummy version
linux
read outline in 0.00 seconds
read outline in 0.00 seconds
read outline in 0.00 seconds
read outline in 0.00 seconds


server: Unexpected Exception! 'NoneType' object has no attribute 'findCommands'
Traceback (most recent call last):
File "/home/jkn/leo-editor/leo/core/leoserver.py", line 5178, in ws_handler
answer = controller._do_message(d)
File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4467, in _do_message
result = func(action, param)
File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4483, in _do_server_command
return func(param)
File "/home/jkn/leo-editor/leo/core/leoserver.py", line 1195, in open_file
c.findCommands.ftm = StringFindTabManager(c)
File "/home/jkn/leo-editor/leo/core/leoGui.py", line 599, in __init__
self.init_widgets()
File "/home/jkn/leo-editor/leo/core/leoGui.py", line 640, in init_widgets
c, find = self.c, self.c.findCommands
AttributeError: 'NoneType' object has no attribute 'findCommands'


server connection finished. Total: 0, Limit: 1
Shutting down leoserver
Closing Leo Server
Checking for changed commanders...
Stopped leobridge server

I'm checking with other files...
    J^n

Edward K. Ream

unread,
Oct 1, 2022, 3:05:53 PM10/1/22
to leo-e...@googlegroups.com
On Sat, Oct 1, 2022 at 10:14 AM jkn <jkn...@nicorp.f9.co.uk> wrote:
Hmm - with branch ekr-server-erro-message (and opening a file of zero bytes), I now get:
[snip]

Thanks for your testing.  I'll look into the new exception.

Edward

Edward K. Ream

unread,
Oct 2, 2022, 6:12:48 AM10/2/22
to leo-e...@googlegroups.com
On Sat, Oct 1, 2022 at 10:14 AM jkn <jkn...@nicorp.f9.co.uk> wrote:
Hmm - with branch ekr-server-erro-message (and opening a file of zero bytes), I now get:
[snip]

server: Unexpected Exception! 'NoneType' object has no attribute 'findCommands'

I think Leo, Leo's bridge, leoInteg and leoJS can live with this exception.

I'll take another look to see if there is some kind of clean fix. Don't bet on it. The logic involved is necessarily complex.

Edward

jkn

unread,
Oct 2, 2022, 8:49:14 AM10/2/22
to leo-editor
Yeah - just to be clear, I am not complaining about "Leo/LeoInteg can't open empty files".
I just happened to come across this...

J^n
Reply all
Reply to author
Forward
0 new messages