[英]Why can't I set mark on emacs?
I am trying to run Emacs on a guest system (Ubuntu 12.04) 我正在尝试在访客系统(Ubuntu 12.04)上运行Emacs
inside a Windows 8 command console. 在Windows 8命令控制台中。
This is done through vagrant + Virtual box. 这是通过vagrant + Virtual box完成的。
It looks like this, 看起来像这样
Guest system : Ubuntu 12.04 访客系统:Ubuntu 12.04
Host system : Windows 8 主机系统:Windows 8
Environment : Virtual Box + Vagrant 环境:虚拟盒子+流浪汉
Emacs works fine except I can not set mark on text (C-SPC). Emacs可以正常工作,除非我无法在文本(C-SPC)上设置标记。
I supposed there is some kind conflict with the key binding. 我认为键绑定存在某种冲突。
So I tried and added this to init.el, 因此,我尝试将其添加到init.el中,
(global-set-key (kbd "C-8") 'set-mark-command)
It doesn't work either. 它也不起作用。
Would someone please advice me? 有人可以建议我吗?
If you're running Emacs in a terminal, then C-SPC
and C-8
are unlikely to send what you want them to . 如果您在终端中运行Emacs,则
C-SPC
和C-8
不太可能发送您希望它们发送的内容 。
Use Ch c C-SPC
to ask Emacs what it's seeing. 使用
Ch c C-SPC
询问Emacs所看到的内容。
Try using C-@
instead. 尝试改用
C-@
。
FYI, I found the Cygwin X server excellent for running GUI Emacs in a Windows-hosted VM. 仅供参考,我发现Cygwin X服务器非常适合在Windows托管的VM中运行GUI Emacs。 With GUI Emacs you can use many more key combinations than a terminal emulator will permit.
通过GUI Emacs,您可以使用比终端仿真器所允许的更多的组合键。
If you try that, start the server with startxwin
rather than startx
(the former enables the X server's windows to appear as regular Windows windows), and then connect from an xterm with ssh -X
or ssh -Y
(see the man page) to connect with X11 forwarding. 如果尝试这样做,请使用
startxwin
而不是startx
启动服务器(前者使X服务器的窗口显示为常规Windows窗口),然后使用ssh -X
或ssh -Y
(请参见手册页)从xterm连接到与X11转发连接。
Thanks a lot for the hint. 非常感谢您的提示。
I finally figured out what the problem really is. 我终于弄清楚了问题所在。
From the answer @phils, this link clarifies the problem. 从答案@phils中,此链接可以阐明问题。
Why does Ctrl+. 为什么按Ctrl +。 not work when I bind it to a command in Emacs?
将其绑定到Emacs中的命令时不起作用?
In my case, all C-[any other key]
bindings work, except for the set-mark-command. 就我而言,除了set-mark-command之外,所有
C-[any other key]
绑定都有效。
I found a workaround. 我找到了解决方法。
By adding the following code to .emacs.d\\init.el
I can use F8 to set mark now. 通过将以下代码添加到
.emacs.d\\init.el
我现在可以使用F8设置标记。
(global-set-key [f8] (quote set-mark-command))
It is still confusing why in other command, Ctrl+key bindings works. 仍然令人困惑的是,为什么在其他命令中,Ctrl +键绑定仍然有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.