OK, I have made some further investigation using a minimal, almost-empty 
myLeoSettings.leo.

I think the issue I am seeing is more about the use of @shortcuts than 
@commands

1) I have a myLeoSettings.leo like this:

@settings
    @commands
        @command test_cmd1 @key=Alt+Ctrl+1    # holds "g.es("test_cmd1")"
        @command test_cmd2 @key=Alt+Ctrl+2    # holds "g.es("test_cmd2")"

If I start Leo with this in force, then with a new outline, the key 
shortcuts give the expected output.

2) if instead I have a myLeoSettings.leo like this:
@settings
    @commands
        @command test_cmd1    # holds "g.es("test_cmd1")"
        @command test_cmd2    # holds "g.es("test_cmd2")"
    @keys
        @shortcuts  # body is:" test_cmd1 = Ctrl+Alt+1 \n test_cmd2 = 
Ctrl+Alt+2", on two lines

(which I would expect to have the same effect)

Then I see the issue - Ctrl+Alt+1 and Ctrl+Alt+2 work in 'original' files, 
but appear not to be in effect if a new .leo file is created

Does that help? Or is there something similar to the '@commands ... 
@command' arrangement that is needed for @shortcuts node settings to be 
'global'?

My original (somewhat garbled) report does mention using both arrangements. 
I am not clear why I have both, it was probably just my experiments. But 
generally, I guess I would expect @shortcuts settings to be global?

    Thanks a lot
    J^n



On Wednesday, June 25, 2025 at 11:29:23 AM UTC+1 jkn wrote:

> Hmm. My @command nodes *are* within an @commands node in 
> myLeoSettings.leo (at least in the machine I am on right now).
>
> I will try to make a super-simple example to double-check what I have been 
> seeing.
>
> Thanks for your attention to this.
>
>     J^n
>
>
> On Tuesday, June 24, 2025 at 6:07:23 PM UTC+1 Edward K. Ream wrote:
>
>> On Tuesday, June 24, 2025 at 11:52:29 AM UTC-5 Edward K. Ream wrote:
>>
>> I have just closed #4371 
>> <https://github.com/leo-editor/leo-editor/issues/4371> because the 
>> primary complaint is invalid. But your confusion is understandable. By 
>> default, `@button` and `@command` nodes are *local*  to 
>> myLeoSettings.leo.  You define *common* `@button` nodes as follows:
>>
>> @settings
>>   @buttons
>>     @button test @key=f3
>>
>> My apologies for not setting you straight earlier.
>>
>>
>> I have just opened #4377 
>> <https://github.com/leo-editor/leo-editor/issues/4377> to fix incorrect 
>> legends in the show-bindings command.
>>
>> Edward
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/leo-editor/ef31ef18-7ec1-42ed-9861-e185430395dbn%40googlegroups.com.

Reply via email to