[prev in list] [next in list] [prev in thread] [next in thread]
List: ess-help
Subject: Re: [ESS] emacs backup files
From: Stefan Husmann <stefan-husmann () t-online ! de>
Date: 2011-09-27 0:45:10
Message-ID: 4E811C96.2070504 () t-online ! de
[Download RAW message or body]
Am 08.09.2011 14:10, schrieb Jannis:
> Dear list members,
>
>
> even though this might be more of an emacs question, I am sure you might have some \
> advice as well.
> I want to stop emacs from writing these ~filename and #filename# files in the \
> folder togehether with the file but rather to bu these files in one central \
> location (they came rather handy yet on several ocasions ;-) ).
>
> Some googleing brought me to this solution in my .emacs file:
>
> ;; Save all backups in one directory
> (defun make-backup-file-name (filename)
> (defvar backups-dir "~/Emacs_Backup/")
> (make-directory backups-dir t)
> (expand-file-name
> (concat backups-dir "." (file-name-nondirectory filename) "~")
> (file-name-directory filename)))
>
>
> Emacs still, however, creates #filename# files on the original location which is \
> specially annoying in case I work on a file mounted remotely when this causes write \
> errors and frequent emacs freezes.
> Am I doing anything wrong here?
>
>
> Jannis
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
Hello,
your solution IMHO only deals with backup file (*~), not with autosave files (#*#).
I have the following code in my .emacs, which does the trick for both kinds of files.
(defvar user-temporary-file-directory
(concat temporary-file-directory user-login-name "/"))
(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
(setq backup-directory-alist
`(("." . ,user-temporary-file-directory)
(,tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
(concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
`((".*" ,user-temporary-file-directory t)))
Regards Stefan
______________________________________________
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic