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: Sun, 18 Apr 2004 22:06:42 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden (Björn Lindström) writes:

> Currently I use this thing for Tramp backups:
>
> (add-to-list 'backup-directory-alist
>              (cons tramp-file-name-regexp nil))
>
> 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'.

> Also acceptable would be to put them with my local backup files in
> ~/.backup/method:host:!path!of!file~1~ or something like that. I would
> think that's what Tramp would do with backup-directory-alist set to
> (("." . ".backup")). However, that leads to Tramp complaining about the
> backup file name not being a Tramp file name (duh!).

Hmm. I've tried this one:

(add-to-list 'backup-directory-alist
             (cons "." "~/.backup"))

That gave me exactly what you wanted. I've tested it with the CVS
version of Tramp; I vaguely remember there has been some problems in
the past fixed meanwhile, but I cannot identify the corresponding
Changelog entry.

> If none of those setups are possible, I'd like to know how I disable
> backups for Tramp files completely, by setting backup-inhibited locally
> for those buffers. I would think I could do that with tramp-mode-hook or
> something similar, but can't find it.

Emacs disables backups checking `make-backup-files'. Your desired
behaviour would require to set this variable locally, again, for Tramp
files.




reply via email to

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