[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it possible to prevent emacs auto saving the filename~?



明覺 <shi.minjue@gmail.com> writes:

> thank you, now I prefer the way to keep all the backup and autosave
> files in a seperate directory, such as ~/.emacs.d/autosave and
> ~/.emacs.d/backup, how could i setup that?  I'm not familiar with
> emacs, currently in my machine, there is only the ~/.emacs.d/
> directory which seems relative to emacs setup. Could you help give a
> document that details the setup steps for those purpose? thanks

I have this in my .emacs:
;; Backup
(defvar backup-dir (expand-file-name "~/.emacs.d/ebackup/"))
(defvar autosave-dir (expand-file-name "~/.emacs.d/eautosave/"))
(setq backup-directory-alist (list (cons ".*" backup-dir)))
(setq auto-save-list-file-prefix autosave-dir)
(setq auto-save-file-name-transforms `((".*" ,autosave-dir t)))

I am not sure, I think it was in the emacs faq.

hth


Reply to: