Re: When scripting with Leo, how to call a command by name?

2023-09-04 Thread Edward K. Ream
On Monday, September 4, 2023 at 5:01:51 AM UTC-5 Edward K. Ream wrote: On Sun, Sep 3, 2023 at 7:41 PM Félix wrote: The *c.doCommandByName* method exists, but it insists on having an event as a second parameter. ... I discovered that I can make it work by passing a fake event such as : {"c":

Re: Quick Survey: When running script in leojs, where should the 'vscode' object be accessible?

2023-09-04 Thread Edward K. Ream
On Sun, Sep 3, 2023 at 8:33 PM Félix wrote: I thought I'd share this :) > > Just a small example script that is possible to run in leojs, (with also > having the vscode API available in g.app.vscode) > > Incredibly, when executing the script, the global objects you'd expect to > see in

Re: When scripting with Leo, how to call a command by name?

2023-09-04 Thread Edward K. Ream
On Sun, Sep 3, 2023 at 7:41 PM Félix wrote: The *c.doCommandByName* method exists, but it insists on having an event as > a second parameter. Hah. I had completely forgotten about c.doCommandByName. Furthermore, I had completely mis-remembered the complexity of k.simulateCommand. Maybe

Re: When scripting with Leo, how to call a command by name?

2023-09-04 Thread jkn
FWIW the current options for doing this have always seemed a bit sub-optimal to me, due to the reasons you suggest. c.executeMinibufferCommand('name-of-command') seem like the wrong level to me, I should be able to call something 'lower down' than this... On Monday, September 4, 2023 at