I would say that after you move the scripts back under an *@commands *node that it would be best to restart Leo to be on the safe side. I have noticed that when I add some *@command* and reload settings but don't restart Leo, the new command doesn't get registered. Once it's there, one can usually modify the script and the command will still run it. (The *mmap-xxx* commands are a little different in that the *mmap-monkeypatch* *script* (*not* the command) needs to be run again. But that's not something that would ever need to be done in normal use).
On Friday, August 6, 2021 at 9:18:25 PM UTC-4 [email protected] wrote: > Interesting and I don't know what to make of it. The best thing to do > would be just to put them all under an *@commands* node. Anything about > just how the commands are registered with Leo and exactly how Leo invokes > them is, of course, way beyond the scripts themselves. Mostly I'm > interested in what's going on with VR3 and those error messages. > > On Friday, August 6, 2021 at 8:41:43 PM UTC-4 lewis wrote: > >> Hi Thomas, >> I have the @command scripts in myLeoSettings.leo not in a separate >> outline. >> If I move the @command scripts up to the same level as @commands, running >> mmap-tree causes Leo to crash with no console messages. >> The crash also occurred with headline @string mmap_render_dev = freewin >> and = browser. I confirmed this several times. >> >> This matches leoSettings.leo>\@commands node which states: >> "Denotes the tree containing active @command nodes. @command nodes >> outside this tree are ignored." >> >> I will retest with the @command scripts in the separate outline and let >> you know. >> On Friday, August 6, 2021 at 10:31:46 PM UTC+10 [email protected] wrote: >> >>> Thanks for the feedback. >>> >>> On Friday, August 6, 2021 at 5:48:42 AM UTC-4 lewis wrote: >>> >>>> Tried out the Mindmap scripts and they are excellent! Thanks for all >>>> the work. >>>> >>> >>> : ) >>> >>> >>>> I have not used @commands before so it took me a while to realise the 3 >>>> scripts had to be children of the @commands node. It may help users if >>>> this >>>> is made clear in README>The Commands. >>>> >>> >>> That's odd, because I have quite a few @command nodes that are not under >>> an @commands parent. In fact, I even have an *@string* setting mixed >>> in with the mind map commands under @commands, and that works. The >>> commands I have that are not under an @commands node are in a separate >>> outline, not *myLeoSettings.leo*. I wonder if that makes a >>> difference. Maybe someone who knows more can tell us the facts here. >>> >>> >>>> Running the mmap-tree command worked and created the @clean mmap.html >>>> node. I'm not sure this is actually a problem with the Mindmap script but >>>> I >>>> get this error in the log pane: >>>> >>> >>> That seems to be an error with Viewrendered3. I haven't seen it before >>> (I'm its developer). My version of Leo is the same as yours: >>> >>> Leo 6.4-devel2, devel branch, build 27d3615ab2 >>> 2021-08-03 16:08:35 -0500 >>> Python 3.9.5, PyQt version 5.15.2 >>> Windows 10 AMD64 (build 10.0.19043) >>> >>> It seems very unlikely that Python 3.9.5 vs 3.9.6 or the minor Windows >>> version could be a factor. Have you gotten this error any other time with >>> VR3? If you run the mind map command again, do you get it again? Do you >>> get it if you make a mind map on a different node? I just made several >>> mind maps using VR3 for the output and did not get any errors. >>> >>> Would you do me a favor? Enable the Freewin plugin, and add a new >>> setting with headline *@string mmap_render_dev = freewin. *This could >>> be in an outline or in myLeoSettings.leo. Reload settings. Then make a >>> mind map on the same node as before. The output will open in Freewin >>> instead of VR3. Post here whether you get any errors doing it that way. >>> >>> If you wanted to make one more test for me, you could change the setting >>> to *browser* and again see if you get an error making the mind map. >>> >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *Leo Log WindowLeo 6.4-devel2, devel branch, build 27d3615ab22021-08-03 >>>> 16:08:35 -0500Python 3.9.6, PyQt version 5.15.2Windows 10 AMD64 (build >>>> 10.0.19042) SP0read outline in 3.24 secondsVR3 stylesheet: >>>> N:/git/leo-editor/leo/plugins/viewrendered3/vr3_rst.cssTraceback (most >>>> recent call last): File "N:\git\leo-editor\leo\core\leoCommands.py", line >>>> 2203, in doCommandreturn_value = command_func(event) File >>>> "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1242, in >>>> update_rendering_panevr3.update(tag='view', keywords={'c': c, 'force': >>>> True}) File "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 1908, >>>> in updatef(_tree, keywords) File >>>> "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 2753, in >>>> update_rstself.set_html(h, w) File >>>> "N:\git\leo-editor\leo\plugins\viewrendered3.py", line 3649, in >>>> set_htmlw.setHtml(s, url_base)TypeError: setHtml(self, str): too many >>>> arguments* >>>> >>>> -- 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/eabaa2a8-4da6-4905-a60c-80765ff3a92en%40googlegroups.com.
