Reminder: global @button and @command scripts are static

22 views
Skip to first unread message

Edward K. Ream

unread,
Mar 13, 2018, 4:32:11 AM3/13/18
to leo-editor
So-called common @button/@command nodes are defined in the @buttons/@settings trees in myLeoSettings.leo.  These appear in all outlines. Their corresponding script can be executed anywhere.

Unlike @button and @button scripts defined in individual files, common scripts do not update automatically.  You must restart Leo for changes to common scripts to take effect.

Long ago Kent asked that common @button/@command scripts would update dynamically.  After considerable work, I declared in #171 that this was a bad idea.

I now see that it is quite a good idea.  Alas, it's still not likely to happen. #171 tells why. Dynamic update would require opening myLeoSettings.leo whenever such buttons (or commands) were executed.  Iirc, I tried opening myLeoSettings.leo in a null gui, but that was far from a complete solution.

I have recently grown quite fond of using common @command nodes to define test commands.  I'll still use them, but I'll have to be wary about changing them.

Edward

Edward K. Ream

unread,
Mar 13, 2018, 9:25:40 AM3/13/18
to leo-editor
On Tue, Mar 13, 2018 at 3:32 AM, Edward K. Ream <edre...@gmail.com> wrote:

Unlike @button and @button scripts defined in individual files, common scripts do not update automatically.  You must restart Leo for changes to common scripts to take effect.
​...​
 
I now see that it is quite a good idea.  Alas, it's still not likely to happen. #171 tells why.

​This is bugging me.  I'll attempt the relevant special case when myLeoSettings.leo is open.

Edward
Reply all
Reply to author
Forward
0 new messages