[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backup on DAV
From: |
Michael Albinus |
Subject: |
Re: Backup on DAV |
Date: |
Tue, 17 Nov 2009 15:43:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Gaute Amundsen <address@hidden> writes:
>> > Is there a way to disable backups only when in tramp, or even better
>> > only when using dav?
>>
>> Try this:
>>
>> (setq backup-enable-predicate
>> (lambda (name)
>> (and (normal-backup-enable-predicate name)
>> (not
>> (let ((method (file-remote-p name 'method)))
>> (when (stringp method)
>> (member method '("dav" "davs"))))))))
>>
>
> Works nicely except that I get:
> "file changed on disk; really edit the buffer? (y, n, r or C-h) "
> when I start editing again after a save. Both with dav and sudo so far.
Oops, that's an error. Timestamps are refreshed when backups are
written; disabling backup shows this error. I've fixed it in Tramp.
>> I will check, whether it is possible the preserve the content-type of
>> files in tramp-gvfs.el
I haven't been successful with this. GVFS does not allow to set
content-type of files explicitly (there is such a D-Bus method, but it
seems not implemented).
Coming back to your original problem, try this:
(setq tramp-backup-directory-alist '(("/davs?:" . "/.emacs.d/backups/")))
This shall write all backup files into the directory .emacs.d/backups/
on the remote WebDAV server. The trick is, that your home directory
there is "/".
> Regards
>
> Gaute
Best regards, Michael.