bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Delete Auto Save Files doesn't always work


From: Michael Albinus
Subject: Re: Delete Auto Save Files doesn't always work
Date: Fri, 01 Apr 2005 00:02:53 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

"Bielawski, Richard G." <Richard.G.Bielawski@wellsfargo.com> writes:

Hi,

>> What is your value of `ange-ftp-auto-save' (I guess 0)? Does it help
>> to change it to 1?
>> 
> You are correct.  It was 0.  If I change to 1 it will only delete 
> the backup file if auto-save happens first.  IOW if the auto-save 
> file exists and I make a change to my file (without recovering) and 
> save the change before an auto-save happens then the obsolete 
> auto-save file is not purged.  If I wait for an auto-save before 
> saving manually then the auto-save file is cleaned up.
>
>> But if my guess is right, you shouldn't have an autosave file 
>> at all...

Finally, I believe it is a side-effect of Tramp. Could you try the
following patch on tramp.el (based on Tramp 2.0.48 source)? It should
fix both problems:

diff -u -r2.359.2.31 tramp.el
--- tramp.el    27 Feb 2005 14:28:50 -0000      2.359.2.31
+++ tramp.el    31 Mar 2005 21:53:55 -0000
@@ -4834,6 +4834,7 @@
 (defun tramp-set-auto-save ()
   (when (and (buffer-file-name)
              (tramp-tramp-file-p (buffer-file-name))
+            (not (tramp-ftp-file-name-p (buffer-file-name)))
              auto-save-default)
     (auto-save-mode 1)))
 (add-hook 'find-file-hooks 'tramp-set-auto-save t)

> Now that you point it out ... this is true.  But I think that having
> auto-save ON by default is quite a good thing.

I don't think so. It could be a security threat, because auto-saved
files go to the local host by default. Imagine you edit a remote file
as root, which is accessible locally under your user account...

Best regards, Michael.




reply via email to

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