Edward's recent post about simplifying Leo prompted a question that I've had for some time. How are markdown and reStructured Text different, and more importantly, why (or when) choose one over the other? My guess is that they are different 'dialects' of a similar language, but with somewhat different rules. I also notice that the output files (@clean or @file) differ in the handling of comment sections depending on which @language is selected; @language md creates comments as if the file were an xml or html file, whereas @language rest creates pure rst comments (..) Maybe it's just a personal preference, but others' insights on reasons for their choices would be most welcome.
Rob..........
--
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 leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
As for the comments thing -- markdown doesn't actually have comment syntax! The entirety of a markdown file is supposed to be human readable content. The workaround is using HTML comments, because the markdown spec states that a markdown parser shouldn't manipulate any elements that it can't identify, instead passing them verbatim to the finished document.
Edward's recent post about simplifying Leo prompted a question that I've had for some time. How are markdown and reStructured Text different, and more importantly, why (or when) choose one over the other? My guess is that they are different 'dialects' of a similar language, but with somewhat different rules. I also notice that the output files (@clean or @file) differ in the handling of comment sections depending on which @language is selected; @language md creates comments as if the file were an xml or html file, whereas @language rest creates pure rst comments (..) Maybe it's just a personal preference, but others' insights on reasons for their choices would be most welcome.
Rob..........
> I'll be retiring the viewrendered2 plugin asap, folding whatever
> features it might still uniquely provide into vr.
That's great - just a note that the viewrendered pane shouldn't be a
singleton... you could have a particular instance bound to
`hide-viewrendered` etc. etc., but you be able to have more than one
viewrendered pane viewing different things at different times.
This
functionality has existed to various degrees at various times, but
might be a bit fragile. For one thing it implies some vr panes track
the current tree position and some don't.
Let me know if I can help with any of the free_layout related aspects.
Sorry for the late reply.
I agree Edward, although rather than having VR2 based on VR, I think there should only be one viewrendered-type plugin. Having two must confuse a lot of users!
A few comments:
There was a proposal in 2015 to merge VR2 and VR2 - https://groups.google.com/forum/?hl=en-GB#!searchin/leo-editor/VR2/leo-editor/cgmkazlacxg/YDrBKCyUBFMJ
As I mentioned in that thread:
“.. it was always intended to be merged with VR later on because of all the common code that remained and the confusion caused by the multiple VR plugins. Also, when installed, VR2 masquerades as VR anyway, to retain compatibility with the pane management etc.”
(re Jake’s comment) Multiple VR2 panes was not only possible but incorporated into the design and GUI. VR2’s “Lock to node” option allowed a VR2 pane to stay rendering the nominated node, even when another VR2 pane was opened (using freelayout) and followed the highlighted node. This could in theory be extended to several VR2 panes locked to their own nodes. Alas, this “lock to node” feature broke somewhere in the very necessary conversion to Python3 code (the fix is not that hard though).
Now that I test this (not having had multiple VR2 panes open for a long while), I find that a second VR2 pane refuses to open. It definitely used to work well. Similarly, with a VR2 pane open, getting help on a plugin would open a second VR2 pane (which also doesn’t work now).
As Edward points out, VR2 is essentially a modified copy of VR that uses the QWebView renderer and a little GUI. This makes maintenance of both a chore because updates to the VR code has to be redone on VR2 in order to keep them in sync.
I still use only VR2 (in fact this post has had it's html copied and pasted out of VR2) so I know it still does most of the things it was intended for, although I do sometimes patch in some fixes, like for the above “lock to node” bug.
In summary, I’d suggest (depending on how well VR2 has kept up with VR’s updates) that VR2 is essentially a superset of VR functionality, and should become the only VR plugin. If there is something that the VR renderer has that VR2’s QWebview pane cannot reproduce, then incorporating that would be good. It must be a superset of VR functionality to allow us to drop VR. Worst case, if necessary, would be to have a configuration item to choose which renderer the only VR plugin uses.
Of course we would need to fix some bugs in VR2 too ;-). I think I have a bit better handle on “git” these days, so I could probably be able to successfully submit a pull request as Edward suggested in the earlier discussion ;-)
Peter
In summary, I’d suggest (depending on how well VR2 has kept up with VR’s updates) that VR2 is essentially a superset of VR functionality, and should become the only VR plugin.