On Friday, August 9, 2019 at 2:41:39 AM UTC-5, Edward K. Ream wrote:

And now my subconscious is screaming at me...The *big question* (how to 
> integrate pyzo and Leo) can not be ignored. 
>

After a bit more sleep I see that this project is still experimental, no 
matter how much apparent progress there has been.

*Big questions imply lots of study*

The next steps will to focus on a series of smaller questions and projects.

*Wrapper functions*

Let's compare this project with #990 
<https://github.com/leo-editor/leo-editor/issues/990>: embed neovim into 
Leo.  In each case, we want to make the new body pane scriptable.

But that's easy!  Just implement the wrapper api in each editor: @file 
leoFrame.py-->API classes-->class WrapperAPI, which means that each editor 
has a "widget" and "wrapper" ivar.  In pyzo's case, self.widget = self for 
instances of QtWidgets.QWidget.

*Repaint*

I like the effect of pyzo's repaint code.  Leo doesn't use QWidget.repaint 
this way, and I think it should. #1278 
<https://github.com/leo-editor/leo-editor/issues/1278> suggests using a 
table to control repaint.  This would free Leo from the details of pyzo's 
code.

*Signals*

Pyzo uses user-defined signals effectively.  I'll want to study this in 
detail, and possibly adapt this approach to Leo's legacy code.

*Key handling*

#1269 <https://github.com/leo-editor/leo-editor/issues/1269> suggests using 
per-pane tables, created when Leo starts up, instead of the present baroque 
code.  Specific keys might trigger specific repaints, possibly as the 
result of specific signals.

*Show whole files in the body pane*

This is how pyzo works. Kent has requested this once or twice.  I have just 
created #1279 <https://github.com/leo-editor/leo-editor/issues/1279> for 
this.

At present, Leo opens a wrapper outline containing the whole file in an 
@edit node.  The pyzo way is more intuitive.

*Summary*

The "pyzo complex" of issues and questions promise to improve Leo.  I'll 
approach the task at hand incrementally, focusing on small bits of the 
puzzle.

All the issues presented here are experimental.  I can't make any firm 
predictions about when, or if, they will happen.

I'll wrap up the present phase of the pyzo_file_browser plugin, and rename 
it to pyzo_in_leo.py.  After that I'll turn my attention to studying some 
of the smaller projects mentioned here.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dba6dffa-5a77-44cd-aaf7-8ef585f8fb87%40googlegroups.com.

Reply via email to