Re: Ahas re tree traversals

2022-03-31 Thread Edward K. Ream
On Thursday, March 31, 2022 at 7:57:39 PM UTC-5 tbp1...@gmail.com wrote: > Or, to put things another way, when you reach the end of a subtree, you > don't automatically know how many levels (or indents, if you think of > levels as indents) to return to. The leaf of a subtree won't have a next

Re: Ahas re tree traversals

2022-03-31 Thread Edward K. Ream
On Thursday, March 31, 2022 at 7:01:34 PM UTC-5 Edward K. Ream wrote: For example, Fstringify.visit uses none of the links that were...created. > Actually, some Fstringify code *does* use parent links, so I've left them in. Amazingly, PR #2556

Re: Ahas re tree traversals

2022-03-31 Thread tbp1...@gmail.com
Or, to put things another way, when you reach the end of a subtree, you don't automatically know how many levels (or indents, if you think of levels as indents) to return to. The leaf of a subtree won't have a next link, so you need some state to know where to go next. On Thursday, March 31, 2

Re: Ahas re tree traversals

2022-03-31 Thread Edward K. Ream
On Thursday, March 31, 2022 at 3:52:55 PM UTC-5 Edward K. Ream wrote: > After looking at leoAst.py with fresh eyes, the following Aha's emerged: There is a third Aha: parent/child (or any other threading links) are almost useless! No amount of links will suffice to drive a tree traversal. It'

Re: Ahas re tree traversals

2022-03-31 Thread Edward K. Ream
On Thu, Mar 31, 2022 at 3:52 PM Edward K. Ream wrote: P.S. Here is a slightly condensed version of the iterative main loop: > Oops: I had intended to replace self.exec_list with exec_list everywhere. Like this: def main_loop(self, node): func = getattr(self, 'do_' + node.__class__.__name_

Ahas re tree traversals

2022-03-31 Thread Edward K. Ream
I have started work on #2541 , which will add support for new ast nodes in Python 3.10. After looking at leoAst.py with fresh eyes, the following Aha's emerged: 1. Using python generators in the TokenOrderGenerator borders on the absurd. Ge

Re: Leo 6.6 released

2022-03-31 Thread Christophe Vermeulen
Great, congrats for the milestone ! I'll install it on my other computers as well now. On Thursday, March 31, 2022 at 12:46:35 PM UTC+2 Edward K. Ream wrote: > Leo http://leoeditor.com 6.6 final is now available on GitHub > and pypi >

Leo 6.6 released

2022-03-31 Thread Edward K. Ream
Leo http://leoeditor.com 6.6 final is now available on GitHub and pypi . Many thanks to all who have contributed. *The highlights of Leo 6.6* - Replaced `@raw` and `@end_raw` with `@section-delims`. - Improv

Re: usinf Linux signals to cause Leo to eg. save files?

2022-03-31 Thread jkn
On Wednesday, March 30, 2022 at 4:39:37 PM UTC+1 tbp1...@gmail.com wrote: > It ought to be possible to extend leoserver to help with this. As things > stand, you can run a Leo GUI session and a VSCode session at the same time > (I've only done it on the same machine but that's not a fundament