17

I would like to know how to start troubleshooting the following: C-SPC is not doing anything.

It's not appearing in the mini-buffer when I type it but when I look at M-x set-mark-commandit's showing as bound to C-SPC.

Environment
I've installed GNU Emacs (24.5.1) via Homebrew and my .emacs.dis based off of Clojure for the Brave and True with some additional packages.

Steps taken so far
I firstly tried deleting and reinstalling with no affect so what steps can I take to pin-point what's going on?

Additional Info
A list of all installed packages is in screenshot below:

enter image description here

  • 5
    What happens when you use C-h k C-SPC? Do you see a *Help* buffer with the command it is bound to? If nothing at all happens then Emacs is not seeing the C-SPC that you type - it is not receiving it from your keyboard, or it is decoding it improperly. – Drew Mar 29 '16 at 13:59
  • 3
    Try starting Emacs using emacs -Q (no init file). Can you reproduce the problem that way? IOW, remove all of your customizations from the equation (and clearly you have a lot) - all of those packages etc.. – Drew Mar 29 '16 at 14:00
  • 1
    Do you run Emacs as a GUI application or in a terminal window? – Lindydancer Mar 29 '16 at 14:30
  • 2
    I am looking for this solution too. I don't see this problem; but a colleague is seeing it. The problem seems to be more OS level (not specific to emacs). But the strange thing is that we are using the exact same OS. Here is one way to test if emacs can see the C-SPC binding. In a terminal, type cat and then hit C-SPC. This binding works for me in emacs and I also see that doing so after cat displays ^@. But when my colleague (for whom C-SPC does not work) does the same, he sees nothing!, no ^@. It's as if his environment doesn't receive those key codes at all. – Kaushal Modi Mar 29 '16 at 18:13
  • Also, this issue in seen both emacs -Q and emacs -Q -nw. Tried accessing Linux machine (RHEL 6.6) via VNC (Gnome) and Putty.. same issue. – Kaushal Modi Mar 29 '16 at 18:35
26

System Preferences > Keyboard > Shortcuts > Input Sources > Select the previous input source and uncheck

saltycraig's tip on C-h k C-SPC did nothing when I typed it. So, thanks to Kaushal Modi for pointing towards the OS level. Saved many hours of messing around with all my packages.

For completeness I run it as a GUI app (so will need to go and investigate how to start it with emacs -Q).

Thanks everyone!

enter image description here

  • 2
    To start a GUI Emacs without an init file, you can either temporary rename your init file, or start Emacs from a terminal window using e.g. /Applications/Emacs.app/Contents/MacOS/Emacs -Q. – Lindydancer Mar 30 '16 at 13:35
4

One of the installed packages you have there may be overriding the C-SPC keybinding for something else. Try starting emacs without loading your init file:

$ emacs -Q

Now try doing the key combination:

C-h k C-SPC

And you should see a buffer telling you what it is mapped to. If you don't then the problem is external to Emacs. In that case, one of the other programs you are running is either capturing the C-SPC keystroke and/or preventing it from getting to Emacs. This would be a case of closing all other programs before starting Emacs and also checking for custom keyboard combinations in system settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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