Emacs 守护进程:交换密钥
我想用 Emacs 守护进程交换 Cx 和 Cu(因为我切换到了 Dvorak 布局)。常规的 keyboard-translate
不适用于 Emacs 守护进程。在 help-gnu-emacs 中我找到了一个解决方案:我应该使用 (define-key key-translation-map ...)
而不是 (keyboard-translate ...).然而,尽管交换在许多情况下都没有问题(例如,Cx s),但我一直在发现交换无法正常工作的情况,例如在 Cu Mx eshell 中(当我输入最后一个命令时,我得到的只是但如果我输入 Mx 两次,该命令就会按预期工作)。你知道这个问题有什么解决办法吗?
更多详细信息:
这就是我的 .emacs 中的内容:
;; swap C-x and C-u
(define-key key-translation-map [?\C-x] [?\C-u])
(define-key key-translation-map [?\C-u] [?\C-x])
我正在使用 Emacs 23.3.1。
谢谢!
I'd like to swap C-x and C-u with Emacs daemon (since I switched to Dvorak layout). The regular keyboard-translate
doesn't work with Emacs daemon. In the help-gnu-emacs I found a solution: I should use (define-key key-translation-map ...)
instead of (keyboard-translate ...)
. However, even though the swap works without problems in many cases (e.g., C-x s) I've been finding cases in which the swap doesn't work properly such as in C-u M-x eshell (when I type this last command all I get is "eeee". But if I type M-x twice the command works as it's supposed to). Do you know any solution to this problem?
Further details:
That's what I have in my .emacs:
;; swap C-x and C-u
(define-key key-translation-map [?\C-x] [?\C-u])
(define-key key-translation-map [?\C-u] [?\C-x])
I'm using Emacs 23.3.1.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您看到一个现有的 Emacs bug。我不确定此错误的优先级,但如果您将用户故事发送到错误跟踪器电子邮件:
[电子邮件受保护]
,它会得到更多的关注并可能得到修复。you're seeing an existing Emacs bug. I'm not sure about the priority of this bug, but if you send your user story to the bug tracker e-mail:
[email protected]
, it'll get more visibility and possibly get fixed.