[Top][All Lists]

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

RE: Delete Auto Save Files doesn't always work

From: Bielawski, Richard G.
Subject: RE: Delete Auto Save Files doesn't always work
Date: Fri, 1 Apr 2005 16:53:19 -0800

> >> 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)

I installed this in a 2005/03/30 version of Emacs.  It does seem
to prevent an auto-save unless I've actually turned auto-save on.

Does nobody think it's a problem that an obsolete auto-save file 
isn't purged when the original file is saved unless you happen to 
sit around and wait for an auto-save before saving your change? 

> > 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...
Security works differently on the machines over here.  There is
no such concept as root.  I see your point.  It's a shame such
problems exist on those types of machines.  Security aside, the
default really should be ON but I see why it's impractical.

reply via email to

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