Question

I am not able to set the mark at the current point by C-SPC (both when emacs loads the init file and when it doesn't). However, when I do M-x set-mark-command, the mark is well set and I am able to select the region by moving the cursor. When I do M-x apropos set-mark-command, it shows two bindings C-@ and C-SPC, but only the first one works. Any suggestions will be appreciated. I am running emacs 24.3 on a GUI on Kubuntu 14.04.

Was it helpful?

Solution

Ubuntu 14.04 has an open bug affecting some desktop environments (at least KDE, LXDE and i3, but not Unity).

The default IBus key binding for "next input method" is Ctrl+Space, which prevents this key combination from reaching Emacs (or any other userspace program). To resolve the issue, run ibus-setup and change the key binding for "next input method" to something else (or delete it entirely by clicking the "..." button and then the "Delete" button).

Note that running ibus-setup from Unity, where C-SPC works already, shows a preferences window that does not include the key binding option that needs to be changed.

The "next input method" command cycles through your configured inputs, e.g. perhaps from English to French.

OTHER TIPS

So I tracked down a similar issue to this on macOS. It seems that at some point C-SPC became bound to "Select the previous input source":

keyboard preferences pane

I just had the same issue today which I never had before. I am on Windows 7. As it turns out the Ctrl+SPC is bound to the OS's language switch. So the keystrokes are not sent to emacs at all.

But one thing that is even more weird is that I have never installed new languages/keyboards, yet the 'CH PRC' shows up in my language bar as a language/keyboard today. It turns out to be a Windows 7 bug and all I had to do to fix was:

  • Add 'CH PRC' in the language bar then Save.
  • Remove the language then Save again.

I know you are not on Windows, so the fix may not be the same as mine, but it is very likely Ctrl+SPC is bound to your OS's language switch as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top