tramp-devel
[Top][All Lists]
Advanced

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

Re: Tramp backup stuff


From: Michael Albinus
Subject: Re: Tramp backup stuff
Date: Mon, 19 Apr 2004 22:07:02 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Kai Grossjohann <address@hidden> writes:

>>> However, I think backup files lying around everywhere is a
>>> nuisance. Ideally, I would like to have the backup directory for files
>>> opened with Tramp set to /method:host:.backup. Is that possible?
>>> How?
>>
>> Not so simple. It would require a local setting of
>> `backup-directory-alist' in case of Tramp files, maybe in the
>> `find-file-hook'.
>
> I see.  While one could add ("\\`/ssh:address@hidden:"
> . "/ssh:address@hidden:.backup/") to the list, it would only work
> for *some* Tramp files, not for all of them.  Hm.
>
> Maybe this means that backup-directory-alist is not flexible enough.
> WDOT?  Should we request enhancement of backup-directory-alist in core
> Emacs?

This would be one alternative. DIRECTORY in `backup-directory-alist'
shouldn't be just a string, but also a function which has access on
the match of REGEXP via `match-string' or so. The backup directory
should be derived somehow from the filename matched by REGEXP.

The other alternative is a Tramp implementation of
`find-backup-file-name', adjusting `backup-directory-alist' and
calling the _real_ `find-backup-file-name' afterwards. This case
should be driven by a Tramp counterpart of `backup-directory-alist',
in order not to loose flexibility.

Or whatever.

> Kai

Best regards, Michael.




reply via email to

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