Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In particular, if I type "C-M-SPC" gnome-terminal sends "M-SPC" to emacs. xterm does not have this problem.

Note that this is a different problem than the one where emacs keybindings conflict with menu access keys. This isn't a case of triggering gnome-terminal keybindings, but rather of gnome-terminal just eating one of the modifiers for specific keybindings.

share|improve this question
    
with TRAMP, eshell and ansi-term, I really see no reason to use emacs in a console rather than in a graphical environment. Anyway, you can always remove the menubar from gnome-terminal but I've no idea for C-M-SPC. –  Daimrod Jan 5 '12 at 9:45

1 Answer 1

When Emacs runs in a terminal, its input is a series of characters. When Emacs runs using its graphical UI, its input is a combination of keypresses, giving it a vastly wider range of possible inputs. For instance, the keypress C-` (control backtick) can be bound to a function when Emacs is running with its GUI, but not from a terminal (even a terminal emulator, which is itself a graphical application), because there is no such character as Control-Backtick (not in ASCII, not in ISO-Latin-1, not in the Universal Character Set).

You are trying to send the non-existent character C-M-SPC from a terminal. The fact that xterm makes it work is nice, but you shouldn't expect every terminal to fake out Emacs' input so that you can press key combinations that do not map to real characters in a terminal.

share|improve this answer
    
Real terminals send Nul for C-SPC. Sending ESC NUL for C-M-Spc is the right thing –  fstx May 3 '12 at 16:53
    
@fstx, yes, and apparently gnome-terminal is deficient in this area. @user35742, nothing you can do inside Emacs will make C-M-SPC do the right thing in a gnome-terminal if it fails to do what @fstx describes. –  Fran May 4 '12 at 16:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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