jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.39k stars 259 forks source link

First keypress doesn't work when bind-key is active on emacs 28, emacs daemon + emacs client is used #973

Closed kurnevsky closed 2 years ago

kurnevsky commented 2 years ago

Start emacs 28 daemon with loaded bind-key, then try to edit some file with emacsclient, like emacsclient -nw ~/file. After file is opened first keypress will result in x is undefined (or quit if you press q). It doesn't happen consistently but always happens after fresh emacs daemon start (so it might be a emacs bug). It also works if you move mouse cursor before typing first letter. Not sure how to investigate it further, so decided to report here. It used to work with emacs 27.

Emacs version: 28.0.91 OS: Linux Native compilation is enabled.

kurnevsky commented 2 years ago

cc @Eli-Zaretskii

Eli-Zaretskii commented 2 years ago

What is bind-key? Are you sure it isn't its fault?

kurnevsky commented 2 years ago

bind-key is a part of use-package: https://github.com/jwiegley/use-package/blob/master/bind-key.el That's why I reported it here. It might be its fault - not sure. But the behavior changed in emacs 28 (and it's specific to emacs daemon) so I guessed it might be something there as well.

kurnevsky commented 2 years ago

@Eli-Zaretskii well, it's not bind-key bug after all - I looked through the code and didn't see anything suspicious. I have the same behavior with (require 'easy-mmode) so it's almost certainly emacs bug. Should I report it to the mailing list? :)

Eli-Zaretskii commented 2 years ago

Yes, please report a bug with the minimal recipe as part of the report. The recipe should ideally start with emacs -Q, or if that is impossible, use the smallest possible init file to reproduce the issue.

kurnevsky commented 2 years ago

It turned out to be caused by killing scratch buffer - not that important. I reported it to bug-gnu-emacs. Sorry for disturbance if any.