我通过autofs(.[ch]
)在nfs安装目录上访问/修改/net/<machine>/<c file location>
个文件。虽然我已配置
(setq make-backup-files true)
(setq backup-directory-alist `(("." . "~/.saves")))
(setq delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t)
但是,修改的本地文件(即~/Desktop/1.c
)将备份到.saves
目录。如何将emacs备份到我编辑到.saves
目录的所有文件,无论其nfs是否为nfs。
答案 0 :(得分:0)
这是http://www.emacswiki.org/emacs/TrampMode:
(defun my-find-file-root-hook () "Some personal preferences." ;; Turn auto save off and simplify backups (my version of tramp ;; barfs unless I do this:-) (setq buffer-auto-save-file-name nil) (set (make-local-variable 'backup-by-copying) nil) (set (make-local-variable 'backup-directory-alist) '((".")))) (add-hook 'find-file-root-hook 'my-find-file-root-hook)
另请参阅Tramp手册中的this page。