From c7bd4ebeb5ee493baf78d844234e4d34a09c37e1 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 8 Nov 2009 10:49:06 +0000 Subject: [PATCH] * tramp.texi (Auto-save and Backup): Disable backups just for a method. --- doc/misc/ChangeLog | 7 +++++++ doc/misc/tramp.texi | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5d08081ec00..d18dbea3b7f 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,10 @@ +2009-11-08 Michael Albinus + + * tramp.texi (Auto-save and Backup): Disable backups just for a + method. + + * trampver.texi: Update release number. + 2009-11-07 Michael Albinus Sync with Tramp 2.1.17. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 8b82c3638af..2c48fe32c55 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2057,6 +2057,23 @@ for @value{tramp} files: @end lisp @end ifset +@ifset emacs +It is also possible to disable backups depending on the used method. +The following code disables backups for the @option{su} and +@option{sudo} methods: + +@lisp +(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 '("su" "sudo")))))))) +@end lisp +@end ifset + + Another possibility is to use the @value{tramp} variable @ifset emacs @code{tramp-backup-directory-alist}. -- 2.39.2