I've hung out with Leo since early days, discovered it when exploring
Literate Programming, always liked the focus management outline provides,
but I've yet to get the benefits I was looking for from it. Maybe that is
due to what my envisioned use case is, I'm not looking to write my own
original code, (yet), I want to understand various existing code, pick it
apart, figure out what the author is doing, all with the eye to modifying
it, by changes or plugins.
Edward's recent posts show a lot of progress on flows for Python
development, but I find myself in the weird world of JavaScript these days,
which brings me to topic of the importer, I want to make a plugin for the
html presenter reveal.js I'm tentatively calling nthD, the intent of which
is break the slides out of their 2D "Flatland", and give you the ability to
use as many dimensions as you need to organize them, (think table of
contents, outlines...).
To this end I tried import the main engine of reveal, the file reveal.js,
Leo creates an @auto node, and creates a subtree. I get the following in
the cmd shell I started Leo from:
-----------------------------------------------------------------------------------------------
===== PERFECT IMPORT FAILED ===== reveal.js
len(s1): 4810 len(s2): 4810
first mismatched line: 3174
s1...
3172 'el.controls = true;\n'
3173 '// Once the video does start playing, hide the controls a...(62)\n'
* 3174 "el.addEventListener( 'play', function() {\n"
3175 'el.controls = false;\n'
3176 '} );\n'
s2...
3172 'el.controls = true;\n'
3173 '// Once the video does start playing, hide the controls a...(62)\n'
* 3174 '} );\n'
3175 '}\n'
3176 '}\n'
imported C:/VC/git/reveal.js/js/reveal.js
----------------------------------------------------------------------------------------------------
,
and this in the Log panel:
----------------------------------------------------------------------------------------------------
Leo Log Window
Leo 6.2-b1-devel, devel branch, build b51bcaa8b5
2020-01-05 19:47:27 -0500
Python 3.6.5, PyQt version 5.9.4
Windows 10 AMD64 (build 10.0.18362) SP0
tabs found with @tabwidth -4 in reveal.js
changed leading tabs to blanks in 4800 lines in reveal.js
@auto failed: reveal.js
imported C:/VC/git/reveal.js/js/reveal.js
-----------------------------------------------------------------------------------------------------
Opening reveal.js in vscode I find the line numbers from the cmd shell
don't match the actual line numbers.
It probably shouldn't be surprising that this file choked import, looking
at it, it appears most of the code is a complex nesting of objects,
variables, and functions in a top level anonymous function.
With by cursor in the offending line, I noticed something I hadn't before,
vscode's top line in the buffer was identical to the outline path Leo once
had, (or some plugin gave). From this you could see how the nodes the
import created should have been nested, (there weren't, came out much
flatter).
Anyway, vscode can be use as a check on the import via this line. Note: if
you click on the purple cube prefixing functions, you get that function
outline neighborhood.
Tom
--
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/8cfde0b5-ac88-4801-b405-d9e3bc648e0b%40googlegroups.com.