Gaute Amundsen <[email protected]> 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.


_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to