1

Emacs tramp

 2 years ago
source link: https://blog.yxwang.me/2009/02/emacs-tramp/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Emacs tramp

Mon, Feb 9, 2009 • Tooling

很好用的东东,可以方便的打开需要root权限或是远程服务器上的文件。

统一的url格式是 /method:usr@machine:port/path/to.file,这种方式需要在载入tramp前设置tramp-syntax

(setq tramp-syntax 'url)
(require 'tramp)

也可以用(setq tramp-default-method “scp”) 指定默认的访问方法,这样就不需要/method://了

以我现在的org日程管理为例,个人日程文件保存在机房的73号机上,实验室电脑和寝室电脑上的电脑只要通过tramp远程访问这个org文件即可:

(setq org-agenda-files (list "/scp:[email protected]:/home/wyx/notes/lab.org"))
本作品采用知识共享署名-非商业性使用 3.0 版本许可协议进行许可,欢迎转载,演绎,但是必须保留本文的署名 zellux(包含链接),且不得用于商业目的。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK