From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bielawski, Richard G." Newsgroups: gmane.emacs.bugs Subject: RE: Delete Auto Save Files doesn't always work Date: Fri, 1 Apr 2005 16:53:19 -0800 Message-ID: <7D10EFE37E7CBF4288CAFDFAD3C7932C3466F9@msgswbmnmsp04.wellsfargo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1112403264 28072 80.91.229.2 (2 Apr 2005 00:54:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Apr 2005 00:54:24 +0000 (UTC) Cc: "'Bug-Gnu-Emacs \(E-mail\)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 02 02:54:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DHWtv-000611-IY for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Apr 2005 02:54:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHWvI-0000at-R4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Apr 2005 19:55:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DHWv3-0000Sj-FA for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2005 19:55:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DHWup-0000Nw-9V for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2005 19:55:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHWun-0000NJ-9f for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2005 19:55:05 -0500 Original-Received: from [151.151.5.57] (helo=cadroni.wellsfargo.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DHWtF-0004Ux-0x for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2005 19:53:29 -0500 Original-Received: from unixm4.wellsfargo.com (unixm4.wellsfargo.com [10.30.2.214]) by cadroni.wellsfargo.com (8.12.9-20030924/8.12.10) with ESMTP id j320rCFI011111 for ; Fri, 1 Apr 2005 18:53:12 -0600 (CST) Original-Received: from unixm4.wellsfargo.com (localhost [127.0.0.1]) by unixm4.wellsfargo.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id j320rMTO024937 for ; Fri, 1 Apr 2005 18:53:22 -0600 (CST) Original-Received: from pcs0701-010-03s.ent.wfb.bank.corp (pcs0701-010-03s.wellsfargo.com [10.12.104.216]) by unixm4.wellsfargo.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id j320rMTO024925 for ; Fri, 1 Apr 2005 18:53:22 -0600 (CST) Original-Received: from msgaw55cacah10.wellsfargo.com ([10.12.52.252]) by pcs0701-010-03s.ent.wfb.bank.corp with Microsoft SMTPSVC(5.0.2195.6713); Fri, 1 Apr 2005 16:53:21 -0800 Original-Received: by msgsw55cacah22.wellsfargo.com with Internet Mail Service (5.5.2653.19) id ; Fri, 1 Apr 2005 16:57:17 -0800 Original-To: "'Michael Albinus'" , "Bielawski, Richard G." X-Mailer: Internet Mail Service (5.5.2653.19) X-OriginalArrivalTime: 02 Apr 2005 00:53:21.0911 (UTC) FILETIME=[5E369870:01C5371E] X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:11035 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:11035 > >> 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.