怎么修改emacs自动保存间隔时间

Vim、Emacs配置和使用
回复
头像
Tenyears
帖子: 2245
注册时间: 2005-06-30 15:46
来自: 成都

怎么修改emacs自动保存间隔时间

#1

帖子 Tenyears » 2006-11-10 15:27

emacs自动保存默认是多长时间保存一次?

我想把改小点,怎么办?
Humanity to others // 己所不欲,勿施与人
Laptop: ThinkPad X220 --- Win7 Home / Ubuntu 12.04
Desktop: Win7/Ubuntu 12.04
Server: Ubuntu12.04
morningboat
帖子: 179
注册时间: 2006-06-09 20:31

#2

帖子 morningboat » 2007-01-30 13:11

Sample autosave configure:
;;; Auto-save
;;; Load the auto-save.el package, which lets you put all of your autosave
;;; files in one place, instead of scattering them around the file system.
;;; M-x recover-all-files or M-x recover-file to get them back
(defvar temp-directory (concat "/tmp/" (user-login-name)))
(make-directory temp-directory t)

(setq auto-save-directory (concat temp-directory "/autosave")
auto-save-hash-directory (concat temp-directory "/autosave-hash")
auto-save-directory-fallback "/tmp/"
auto-save-list-file-prefix (concat temp-directory "/autosave-")
auto-save-hash-p nil
auto-save-timeout 100
auto-save-interval 300)
(make-directory auto-save-directory t)
(require 'auto-save)

Sample backup configure:
;;; Put backups in another directory. With the directory-info
;;; variable, you can control which files get backed up where.
(require 'backup-dir)
(setq bkup-backup-directory-info
`(
(t ,(concat temp-directory "/backups") ok-create full-path)
))
(setq make-backup-files t)
(setq kept-old-versions 2)
(setq kept-new-versions 5)
(setq delete-old-versions t)
(setq backup-by-copying t)
(setq backup-by-copying-when-mismatch t)
(setq backup-by-copying-when-linked t)
(setq version-control t)
(setq-default delete-old-versions t)
herberteuler
帖子: 45
注册时间: 2007-01-27 14:11

#3

帖子 herberteuler » 2007-01-30 14:49

代码: 全选

(info "(emacs) auto save control")
回复