There are no solutions to this, in terms of making Ctrl-Space pass through the Bash terminal, at the time of this writing (1 Sep 2016)—but there is a workaround that may be sufficient for many users: use PuTTY to connect via SSH, which forces handling of Ctrl-Space. (In tty mode, it's impossible to distinguish Ctrl-Space from Ctrl-@, because they are the same character code, but that shouldn't be an issue, as by default Emacs is set up to handle
set-mark-command that way.)
- Install the OpenSSH server with
sudo apt-get install openssh-server. If it was already installed, remove it (
sudo apt-get remove openssh-server) and then reinstall it to get the config files reset.
Edit the /etc/ssh/sshd_config file (with sudo), as follows:
- If there is an uncommented line setting
PermitRootLogin, comment it out. Add a line
- Add a line
AllowUsers USERNAME, replacing USERNAME with your Linux username (if you don't know what that is, run the command
whoami at your Bash prompt).
- Ideally you should set up passwordless authentication using SSH keys, but how to do that is out of the scope of this question (there are many guides available; search the web for "passwordless ssh-keygen"). In the meantime, add or uncomment the line
UsePrivilegeSeparation no; likely you will find a line in the file saying
UsePrivilegeSeparation yes; just change the
no and save the /etc/ssh/sshd_config file.
If something goes wrong here, you can restore the file by repeating step #1.
- Startup the SSH server with the command
sudo service ssh --full-restart.
- Using PuTTY (download here), login with
localhost in the Hostname field, everything else left as default. You'll be asked to enter your Linux username and your password.
emacs. Ctrl-space will set the mark as desired.
(Note that the steps above will not, by themselves, make your system able to accept SSH connections from other hosts. To do that, you will also have to change your Windows firewall rules to allow inbound TCP port 22.)
In another answer you said, "but putty is not a local terminal." I'm not sure if you weren't aware that you could use
localhost in this way, or if you were dismissing PuTTY because of the greater overhead versus a local terminal. If the latter, I wouldn't worry, an interactive SSH session is an extremely lightweight load. (It's certainly much less load than running an X Window System so you can run a GUI Emacs or an xterm!)
The only real disadvantage to running this way versus a straight terminal is that paste events are sent letter-by-letter, as if you typed the contents of the clipboard very fast, which may cause electric pairs, indention, snippet expansion, etc. to fire. (Paste should not cause key-chord commands to fire, as there's logic to detect an in-progress paste and disable key-chords until the paste is finished.)
And there's at least one very big advantage over the standard Bash terminal, too: mouse events are supported by PuTTY in a form that Emacs can respond to, so, ironically, you can move the point with the mouse in PuTTY even if you can't with the local terminal.