【发布时间】:2012-12-22 06:46:11
【问题描述】:
我正在尝试使用在 Windows VM 中运行的 Dragon Naturally speak 在 OSX 上驱动 emacs。我不想在 VM 中运行 emacs,而是想驱动已经在 mac 端运行的 emacs(从存储库的 HEAD 构建)。因此,在浏览了 emacs lisp 手册之后,我想出了以下 lisp 的 sn-ps(当前在我解决问题时从暂存缓冲区运行):
;; This part is run from an emacsclient -t session
(defvar slave-frame last-event-frame)
;; and this is run in a GUI frame
(defadvice handle-switch-frame (after update-slave-redirect-advice activate)
(unless (eq last-event-frame slave-frame)
(redirect-frame-focus slave-frame last-event-frame)))
一切都很好。我在终端窗口中输入,显示缓冲区 A,我的输入出现在 GUI 框架中,忙于显示缓冲区 B。太好了。直到我执行C-x C-f 或任何其他需要迷你缓冲区的命令,此时我收到错误Terminal 1 is locked, cannot read from it。
我在这里叫错了树,或者有没有办法让redirect-frame-focus 与使用迷你缓冲区的命令很好地配合?
【问题讨论】:
-
使用
TRAMP并通过共享编辑文件怎么样? -
TRAMP 是许多问题的答案;我广泛使用它。我很确定这不是这个问题的答案。我想在 Windows 上花更少的时间,而不是更多。
-
这里的主机和客户端是什么?
-
emacs --server在主机操作系统(本例中为 OSX)上运行然后,在 Windows VM 中,我 ssh 到主机并运行emacsclient -t