* RE: Delete Auto Save Files doesn't always work
@ 2005-03-28 23:16 Bielawski, Richard G.
2005-03-31 22:02 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Bielawski, Richard G. @ 2005-03-28 23:16 UTC (permalink / raw)
Cc: 'Bug-Gnu-Emacs (E-mail)
> > After opening a remote file using ange-ftp make a change
> and wait for
> > an auto-save to take place. Then kill Emacs. When it asks to save
> > the buffer first, answer No. As documented, the auto-save
> file is NOT
> > deleted. So far so good.
> >
> > Now restart Emacs and open the same file. Note the warning about
> > auto-save data. Again, good. Ignore it, make a change and
> wait for
> > the file to auto-save. Now save your change and close the file.
> > The auto-save file is NOT deleted and never will be hereafter.
> > The problem this causes is, because our host is dumb and
> can't respond
> > to MDTM, every time the file is open a warning occurs
> > your_file.src has auto save data; consider M-x recover-this-file
>
> I don't believe that it is because of mdtm. In my case, the FTP server
> understands it, but I have the same behaviour.
>
> 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...
Now that you point it out ... this is true. But I think that having
auto-save ON by default is quite a good thing.
>
> Best regards, Michael.
>
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Delete Auto Save Files doesn't always work
2005-03-28 23:16 Delete Auto Save Files doesn't always work Bielawski, Richard G.
@ 2005-03-31 22:02 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2005-03-31 22:02 UTC (permalink / raw)
Cc: 'Bug-Gnu-Emacs (E-mail)
"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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Delete Auto Save Files doesn't always work
@ 2005-04-02 0:53 Bielawski, Richard G.
2005-04-03 16:54 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Bielawski, Richard G. @ 2005-04-02 0:53 UTC (permalink / raw)
Cc: 'Bug-Gnu-Emacs (E-mail)
> >> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Delete Auto Save Files doesn't always work
2005-04-02 0:53 Bielawski, Richard G.
@ 2005-04-03 16:54 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2005-04-03 16:54 UTC (permalink / raw)
Cc: 'Bug-Gnu-Emacs (E-mail)
"Bielawski, Richard G." <Richard.G.Bielawski@wellsfargo.com> writes:
> 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?
Usually, it shouln't happen anymore. An auto-save file is written only
if you instruct ange-ftp so. And then it is purged next time you start
to edit that file. Your case was because of the Tramp error.
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-03 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-28 23:16 Delete Auto Save Files doesn't always work Bielawski, Richard G.
2005-03-31 22:02 ` Michael Albinus
-- strict thread matches above, loose matches on Subject: below --
2005-04-02 0:53 Bielawski, Richard G.
2005-04-03 16:54 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.