GNU bug report logs - #78582
30.1; which-key-mode overwrites custom key bindings

Previous Next

Package: emacs;

Reported by: Rick <rbielaws <at> gmail.com>

Date: Sat, 24 May 2025 21:17:02 UTC

Severity: normal

Found in version 30.1

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rick <rbielaws <at> gmail.com>
Cc: 78582 <at> debbugs.gnu.org
Subject: bug#78582: 30.1; which-key-mode overwrites custom key bindings
Date: Sun, 25 May 2025 09:16:25 +0300
> Date: Sat, 24 May 2025 16:16:23 -0500
> From: Rick <rbielaws <at> gmail.com>
> 
> The problem can't be reproduced with -Q however with -q one only needs
> 2 lines in .emacs to recreate.  Also, be forewarned that the problem 
> DOES NOT happen if you specify --debug-init.  This is the only command 
> line option I tried and it hampered predictable recreation efforts.
> 
> .emacs content =
> 
>     (global-set-key [f3] 'describe-key) 
>     (custom-set-variables '(which-key-mode t))
> 
> Upon startup, quickly type C-h k F3.
> It shows F3 is bound to describe-key as expected and the key works 
> normally as do any others you have set. Try it as much as you like.
> 
> Now comes the insidious part.  If you type the 'k' a little bit too
> slowly F3 is overwritten by kmacro-start-macro-or-insert-counter.
> Specifically, type C-h and wait before typing k.  Then F3.

I cannot reproduce this.  I tried both on GNU/Linux and on MS-Windows,
with Emacs 30.1 and the current master branch (which will be some day
Emacs 31), and I don't see the problem.  But then I don't actually
understand what you mean by "F3 is overwritten by
kmacro-start-macro-or-insert-counter" -- can you describe what you
see?  What I see is the *Help* buffer showing the description of
describe-key, as expected.  And that doesn't change if I type 'k'
immediately or after a delay, the only difference between these two is
that when I wait before typing 'k', Emacs pops up the which-key
display showing the possible keys to type after "C-h".  But once I
type 'k', all the rest is the same regardless.

Are you sure you don't have some early-init or site-start file which
could explain the problem?

Does the problem happen if you start "emacs -Q" and then evaluate
those two lines in *scratch* ?

Can anyone else reproduce this strange problem?




This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.