bug-gnu-emacs
[Top][All Lists]
Advanced

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

auto save of remote files


From: Glenn Morris
Subject: auto save of remote files
Date: Fri, 29 Mar 2002 14:51:27 +0000
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2 (i686-pc-linux-gnu)

In emacs-21.2, `auto-save-file-name-transforms' is defined in files.el as
follows:

(defcustom auto-save-file-name-transforms
  `(("\\`/[^/]*:\\(.+/\\)*\\(.*\\)"
     ,(expand-file-name "\\2" temporary-file-directory)))
" ...
The default value is set up to put the auto-save file into the
temporary directory (see the variable `temporary-file-directory') for
editing a remote file."

This means that a remote file of the form:

/HOST:/dir1/foo.el

will be transformed to

/tmp/foo.el

If one simultaneously edits a second remote file with the same basename,
but in a different directory, for example:

/HOST:/dir2/foo.el

then it is transformed to the same local file.

Maybe auto-save could use the same trick as `make-backup-file-name-1' here.
When all backups are to be put in the same directory, they are converted as
follows:

/path/to/dir1/foo.el -> /path/to/backups/!path!to!dir1!foo.el



reply via email to

[Prev in Thread] Current Thread [Next in Thread]