Discuss: remove @root?

69 views
Skip to first unread message

Edward K. Ream

unread,
Feb 16, 2021, 4:26:24 PM2/16/21
to leo-editor
leoTangle.py supports @root files. Such files are deprecated and no longer documented. This is on purpose.

leoTangle.py contains some of Leo's oldest and least satisfactory code.

@root is very slightly more flexible than @file, @clean etc. With @root one can define sections (aka chunks) in several places. This ability is one of the features of Knuth's original web and cweb projects. However, I have never, ever, needed this capability. Imo, it is horrendous programming style.

Several (10?) years ago I proposed removing support for @root. Back then at least one person objected. What do you think? Is anyone still using @root?

Edward

David Szent-Györgyi

unread,
Feb 26, 2021, 12:30:27 AM2/26/21
to leo-editor
Leo is your project, you provide free access to the fruits of your labor, if you're going to remote @root that's your decision, but it may cause me to ask questions I need answered if I am to preserve access to work that I've done. 

I've written about my use of Leo 4.3: it served as an easily deployed tool for building utilities in the form of Windows Script Host files (WSF files), and that I came up with a scheme that made it easy for me to use a LEO file to hold the source code for the library of routines (in JScript or VBScript) used by the WSF files as well as the source code for the utilities I was building. Since each WSF file was independent and had to include every library routine used therein, the libraries ended up written to disk in multiple places in the various WSF files. 

These days, WSF files are frowned up on because script kiddies and other malefactors used VBScript and similar technologies, so perhaps I shouldn't care about preserving the ones I wrote, but I still use some of them in-house, and they need maintenance; I don't want to lose access to my Leo-based development environment if I can help it.

The last thing I would want to do would be cut myself off from Leo's vibrant community; I am still a lone developer, working without help to write utilities for work when I'm short of time for work as it is. That said, if I must give up on using future versions of Leo, what do I do: pick a version of Leo that is closest to my needs and create a fork? 

Given that ease of deployment was essential, and that I was happy with the functions of Leo 4.3 and the Tkinter-based Leo GUI, my choice of version might go back quite a ways. I might have to revive the Tkinter-based GUI; I'd have to dig to find out how many releases of Leo ago I'd have to go. 

Edward K. Ream

unread,
Feb 27, 2021, 11:47:19 AM2/27/21
to leo-editor
On Thu, Feb 25, 2021 at 11:30 PM David Szent-Györgyi <das...@gmail.com> wrote:
Leo is your project, you provide free access to the fruits of your labor, if you're going to remote @root that's your decision, but it may cause me to ask questions I need answered if I am to preserve access to work that I've done. 

Please ask any questions you like.

My question is this: what can you do with @root that is difficult or clumsy with @file? Can you provide an example of how you use @root?

I've written about my use of Leo 4.3: it served as an easily deployed tool for building utilities in the form of Windows Script Host files (WSF files), and that I came up with a scheme that made it easy for me to use a LEO file to hold the source code for the library of routines (in JScript or VBScript) used by the WSF files as well as the source code for the utilities I was building. Since each WSF file was independent and had to include every library routine used therein, the libraries ended up written to disk in multiple places in the various WSF files. 

OK.

These days, WSF files are frowned up on because script kiddies and other malefactors used VBScript and similar technologies, so perhaps I shouldn't care about preserving the ones I wrote, but I still use some of them in-house, and they need maintenance; I don't want to lose access to my Leo-based development environment if I can help it.

I'm not here to judge what people should be doing with Leo!
The last thing I would want to do would be cut myself off from Leo's vibrant community; I am still a lone developer, working without help to write utilities for work when I'm short of time for work as it is. That said, if I must give up on using future versions of Leo, what do I do: pick a version of Leo that is closest to my needs and create a fork? 

Don't worry. Your objection will suffice to have Leo support @root indefinitely.  If you don't mind, I'll add your name to the comments in leoTangle.py, to tell me, and future Leo devs, who's using this feature.

Edward

David Szent-Györgyi

unread,
Feb 27, 2021, 1:19:28 PM2/27/21
to leo-editor
Would you like to have a copy of the LEO file that contains the repository? You could see you my set-up. 

David Szent-Györgyi

unread,
Feb 27, 2021, 1:34:09 PM2/27/21
to leo-editor
Perhaps your current work would allow me to move to @file trees, removing my need for @root.

I see in your recent posting "ENB: Aha re snippets, gnx's and literate programming" discussion of "snippets" that, if they work in @file trees, might offer  some or all of the benefits of cross-file clones. If that were the case, could I use snippets to allow me to clone the contents of VBScript files and JScript files so that the contents of those files would be written to the WSF files?

It would be easiest to use a single LEO file to host all the VBScript and JScript and the WSF files, but if that would break the machinery, I could set up separate LEO files: one for the library routines and management of the library, and one for each for the WSF files I am looking to build. The only requirement would be that I have a means of including the contents of the referenced VBScript file and JScript file in the WSF file that I save. If I could make either of the single-LEO-file scheme work or the one-LEO-file-for-library-and-one-LEO-file-per-WSF-file schemed work, I could abandon the @root directive. 

Edward K. Ream

unread,
Feb 27, 2021, 2:20:50 PM2/27/21
to leo-editor
On Sat, Feb 27, 2021 at 12:19 PM David Szent-Györgyi <das...@gmail.com> wrote:

Would you like to have a copy of the LEO file that contains the repository? You could see you my set-up. 

Yes. That would be helpful.

Edward
Reply all
Reply to author
Forward
0 new messages