有时候我会删除一些不该删除的文件,最糟糕的是我自己写的文件。因此,Emacs 的备份功能多次拯救了我。
但我的问题是,Emacs 只在第一次保存缓冲区时进行备份。有没有办法让 Emacs 每次按下 C-x C-s 都进行备份呢?
这是我当前的 .emacs 文件(只包含与备份相关的部分):
但我的问题是,Emacs 只在第一次保存缓冲区时进行备份。有没有办法让 Emacs 每次按下 C-x C-s 都进行备份呢?
这是我当前的 .emacs 文件(只包含与备份相关的部分):
;; ===== Backups =====
;; Enable backup files.
(setq make-backup-files t)
;; Save all backup file in this directory.
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
;; Always backup by copying (safest, but slowest)
(setq backup-by-copying t)
;; Append .~1~ (and increasing numbers) to end of file when saving backup
(setq version-control t)
;; Defining how many old versions of a file to keep (starting from the
;; most recent and counting backward
(setq kept-new-versions 100)