2

I have always used C-g (ie keyboard-quit) to break out of commands like M-x and C-x C-f. At some point not too long ago this stopped working. All that happens is that Quit flashes in the minibuffer but I still have the previous command waiting for input there. I now have to do Esc Esc Esc (keyboard-escape-quit) or C-] (abort-recursive-edit) to break out of these minibuffer command.

Has the way keyboard-quit works changed? Or was C-g bound to a different function in past versions? It happens even when I start with emacs -Q so it should not be a problem of my configuration.

I am using graphical emacs-25.1.1 on Ubuntu-MATE 17.04.


update

I have found that C-g still works as expected when running emacs in the console, ie emacs -nw using the same emacs-25.1.1 executable as below that does not work in graphical mode.

Furthermore C-h k C-g brings up help for keyboard-quit in the console but causes a Quit message to appear in the minibuffer (without breaking out of the C-h kcommand) in graphical mode. However, C-h f keyboard-quit brings up the the help page which does say that it is bound to C-g

18
  • For me C-g is mapped to keyboard-quit on Emacs 25.2. If you type counsel-describe-binds and enter C-g, it will show you what command you are executing with that key-stroke. Commented Jul 10, 2017 at 23:43
  • I've actually noticed this same issue recently and was wondering the same thing Commented Jul 11, 2017 at 5:31
  • Which version of Emacs are you using, and how are you defining "the not too distant past"?
    – phils
    Commented Jul 11, 2017 at 7:22
  • 1
    Is this with the gtk build? Have you tried the lucid one? packages.ubuntu.com/zesty/emacs25-lucid
    – npostavs
    Commented Jul 27, 2017 at 23:03
  • 1
    Looks like debbugs.gnu.org/cgi/bugreport.cgi?bug=26289 which was closed as unreproducible. I suggest doing a M-x report-emacs-bug to let the maintainers know that this is still a problem and that you are willing to assist in debugging, and perhaps referencing the old bug number. Commented Jul 28, 2017 at 22:30

2 Answers 2

3

This appears to be some kind of bug related to the GTK graphical toolkit. Switching to the Lucid build reportedly avoids the problem. For more about the difference between those toolkits, see my answer to On Linux why should one choose Lucid over Gtk gui for emacs?.


If someone experiencing this problem could debug it and find out the reason why it happens, that would also be interesting, as currently no Emacs devs are able to reproduce it (even when using the GTK build), cf Bug#26289.

1

I have observed the same thing on ubuntu 16.04.

however I also noticed that ESC ESC ESC does work for quitting the minibuffer.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.