emacs-devel
[Top][All Lists]
Advanced

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

Re: discoverability, better defaults and which-key in Emacs


From: Dmitry Gutov
Subject: Re: discoverability, better defaults and which-key in Emacs
Date: Sun, 11 Feb 2024 04:17:21 +0200
User-agent: Mozilla Thunderbird

On 08/02/2024 18:12, Dmitry Gutov wrote:
On 08/02/2024 16:43, Dmitry Gutov wrote:
If you can come up with a code that detects at run time that help-key
and/or F1 was rebound to a key that will not invoke
describe-prefix-bindings, such a key should indeed better be removed
from the message.  But can we reliably do that?  If we cannot, having
two keys there instead of one is better.

Here's a rough draft.

It seems to work in the basic cases that I've tried (changing help-char to something with a binding and rebinding <f1>), but doesn't account for key translations for far (e.g. if help-char is ?X and the prefix map has ?x, this isn't caught).

Also, piping the current used map through so many methods is pretty messy, I'm sure whether I've used the appropriate value in other callsites of echo_now and echo_dash. There's also echo_update...

So if anybody has something simpler in mind that'd be welcome.

Here's that simpler version.

It doesn't address the "key translations" example above, but it seems rare enough, and it should be possible to fix later.

So I suggest we install this now.

Attachment: echo_keystrokes_help_v4.diff
Description: Text Data


reply via email to

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