emacs在不可靠的连接上流淌 [英] emacs tramp over an unreliable connection

查看:124
本文介绍了emacs在不可靠的连接上流淌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 R 上运行本地下的远程 Emacs (我做想要在遥控器上运行Emacs)。



我可以在远程主机上运行 R TRAMP

 (let((default-directory/ user @ remote:〜))
(R))

一切正常,除了连接到 remote 之前, R 死亡。这不是很好,因为这意味着我必须将所有数据重新加载到 R 重新启动,这需要时间。



是否可以告诉 TRAMP 使用持久化终端? ( GNU屏幕 tmux Mosh dtach



另见 emacs-devel 线程 tramp:sshx:(screen | tmux)

解决方案

以下是使用ESS与R在远程屏幕会话中运行的方法:




  • ssh到远程主机(在emacs之外)


  • 开始屏幕会话



  • 在emacs中打开shell( Mx shell


  • ssh在emacs shell中再次出现在远程主机上


  • 恢复屏幕会话( screen -r


  • p>


  • 最终在您启动的shell缓冲区中使用 Mx ess-remote 将ESS附加到R进程R




这篇文章中有更多的细节,截图和关键字 http://blog.nguyenvq.com/2010/07/11/using- r-ess-remote-with-screen-in-emacs /


I want to run R on a remote box under a local Emacs (I do not want to run Emacs on the remote box).

I can run R on a remote host using TRAMP:

(let ((default-directory "/user@remote:~"))
  (R))

and everything works fine except that when the connection to remote is lost, R dies. This is no good because this means that I have to re-load all the data into R after restarting it, which takes time.

Is it possible to tell TRAMP to use a persistent terminal? (GNU Screen or tmux or Mosh or dtach)

See also emacs-devel thread tramp:sshx:(screen|tmux).

解决方案

Here is how to use ESS with R running in a remote screen session:

  • ssh to the remote host (outside of emacs)

  • start screen session

  • detach it

  • open shell in emacs (M-x shell)

  • ssh to the remote host again in the emacs shell

  • resume the screen session (screen -r)

  • start R

  • finally attach ESS to the R process using M-x ess-remote in the shell buffer where you started R

There are more details, screenshots, and keybindings in this post http://blog.nguyenvq.com/2010/07/11/using-r-ess-remote-with-screen-in-emacs/

这篇关于emacs在不可靠的连接上流淌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆