On Thursday, March 2, 2023 at 3:41:48 PM UTC-5 chr...@gmail.com wrote:
If these two indeed don't exist, can they be added by scripting? via a plugin? Maybe I could dot hat, but am not yet quite sure yet, gotta read more doc. The best way to proceed, IMHO, is to develop the script in your workbook. I would assign it to a button during development using the *script-button* button. Once it is working to your satisfaction, copy the code into the *@settings* tree of *myLeoSettings.leo* as an *@command* node, giving it a suitable name. Then the next time you restart Leo, that command will be available to all open outlines. This how I develop most of my scripts, at least the ones that create new commands. I suggest that you prefix your commands with a recognizable prefix, such as your initials. Then when you do command completion in the minibuffer, you will see only your own commands. This reduces the load on your memory, and turns out to be really convenient. For example, I have a command named *tp-outline-from-node*. It's also helpful to prefix experimental commands with, say, *x-*. When the command is ready for prime time then change its prefix. If you find that you are using the command often, you could create an *@button* node for it in *myLeoSettings.leo*. But in some outlines, space for another button may be scarce. It is also possible (not hard) to add the command to an existing menu, or even to create your own custom menu and add your command as an item to it (I call my own menu *Local). *You can also bind it to a keystroke, but I wouldn't do that unless you use it all the time - spare keystrokes are scarce and it can be hard to find the binding after you forget. If you have the script for the command in *myLeoSettings.leo* and you find a bug or would like to change how it works, you can edit it right in the outline, and your changes will be in effect the next time the command is invoked - no need to restart Leo. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/962dd72f-6f10-41e6-a2ab-432cc9acd5b2n%40googlegroups.com.