bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40725: 27.0.91; Tutorial reports false positive key rebindings


From: Basil L. Contovounesios
Subject: bug#40725: 27.0.91; Tutorial reports false positive key rebindings
Date: Wed, 22 Apr 2020 23:26:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: 40725@debbugs.gnu.org
>> Date: Mon, 20 Apr 2020 23:19:46 +0100
>> 
>> The function in question, tutorial--find-changed-keys, is only ever
>> passed the defconst tutorial--default-keys as argument.
>
> Yes, and one of the aspects I thought about was whether this change
> could make use less future-proof, if more keys are added.

I don't think the proposed patch makes the code any less future-proof,
but then my crystal ball isn't the best, and tutorial.el could use some
love regardless, as this bug has shown.

>> In fact, the tutorial doesn't mention C-c at all, but apparently
>> it's included in tutorial--default-keys just because it's an
>> otherwise common prefix.
>
> AFAIU from the code, the main consideration with C-c is when the user
> turns on the CUA mode, not because it's a common prefix.  So maybe we
> should narrow the test to only make sure CUA rebindings get caught?

Good point.  I hadn't thought of that and I'll look into it.

>> > How do we distinguish the case where _all_ of the subcommands were
>> > rebound, for example?
>> 
>> I don't think the current logic tries to handle that either, does it?
>
> Well, we are trying to improve the current logic, aren't we?

You drive a hard bargain. ;) I thought I'd suggest the current small
patch before attacking tutorial.el wholesale, but I can do both in one
go after the end of April when I'll have more free time.

While we're on the topic of improving the manual - it's on my todo to
eventually help with a Greek and possibly even Hungarian translation.
Is there anything more to it than posting a patch to
bug-gnu-emacs/emacs-devel for review, such as getting a GNU translation
team involved or anything like that?

>> > Also, don't we have some prefixes that for the purposes of the
>> > tutorial must not have _any_ of its subcommands rebound?
>> 
>> Hm, I don't know.  Did you have any examples in mind?  The only prefixes
>> I see used in the tutorial are C-x, C-h, and Meta/ESC.
>> 
>> AFAICT if a command-binding pair isn't listed in tutorial--default-keys,
>> then C-h t won't complain about it being rebound.  For example, you can
>> rebind C-x k (which IS mentioned in the tutorial) and C-h t won't notice
>> at all.
>
> So maybe we should add that, to make the test more thorough?

Sure.

>> I can open another bug report for extending tutorial--default-keys to
>> detect changes to all default key bindings used in the tutorial, but for
>> now I think the proposed patch fixes the issue at hand without making
>> things worse.
>
> I just want to make sure we don't do anything that could cause subtle
> problems.  Bugs while reading the tutorial are the worst kind, for
> obvious reasons.

Agreed.

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]