我正在使用本地的emacs实例(aquamacs)在远程服务器上运行R进程,并且我想自动化连接到我的服务器的过程。该过程如下:
[在emacs中]
[在生成的控制台中]
【在emacs中】
我在这里发现了这种通用方法:http://blog.nguyenvq.com/2010/07/11/using-r-ess-remote-with-screen-in-emacs/。 -Y和-C选项允许您使用xterm查看绘图。我不知道lisp语言,虽然我已经搜索过一些资料,但似乎无法拼凑出如何实际定义一个函数来自动化此过程(例如在.emacs.el中)。有人实施过类似的东西吗?
[在emacs中]
M-x shell
[在生成的控制台中]
TERM=xterm
ssh -Y -C <my remote server>
screen -rd [and/or] R
【在emacs中】
M-x ess-remote
r
我在这里发现了这种通用方法:http://blog.nguyenvq.com/2010/07/11/using-r-ess-remote-with-screen-in-emacs/。 -Y和-C选项允许您使用xterm查看绘图。我不知道lisp语言,虽然我已经搜索过一些资料,但似乎无法拼凑出如何实际定义一个函数来自动化此过程(例如在.emacs.el中)。有人实施过类似的东西吗?
(defun automate-connection () (interactive) (shell) (insert "TERM=xterm \n ssh -Y -C \n screen -rd")
(comint-send-input)
(ess-remote)
)
但是(ess-remote)
看起来只有在我已经运行了一个 R-in-shell 进程时才能运行。我猜我需要在(comint-send-input)
和(ess-remote)
之间做一些事情。 - Solomon