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: Eli Zaretskii
Subject: Re: discoverability, better defaults and which-key in Emacs
Date: Thu, 08 Feb 2024 18:50:25 +0200

> Date: Thu, 8 Feb 2024 16:43:41 +0200
> Cc: visuweshm@gmail.com, justin@burkett.cc, philipk@posteo.net,
>  luangruo@yahoo.com, jb@jeremybryant.net, emacs-devel@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> >> If we consider the situations where C-h or f1 is rebound, having
> >> misleading text in the message (with bindings that don't work) should
> >> concern us as well. Even if one of the suggestions is likely to work
> >> anyway (while the other doesn't).
> > 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.
> 
> I think we should be able to, but since help-key doesn't call any 
> command directly through a map or fallback binding of some sort (instead 
> it's dispatched ad-hoc), the solution I have tried so far (also using 
> substitute-command-keys) did not help.

Maybe Stefan (CC'ed) could have an idea.  In general, since the key
sequence was just echoed, we do know what sequence was typed, and can
test whether adding help-char to it would produce a binding, like what
we do in read_key_sequence where we decide whether to invoke
prefix-help-command.



reply via email to

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