From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: Re: Delete Auto Save Files doesn't always work Date: Fri, 01 Apr 2005 00:02:53 +0200 Message-ID: <877jjno4mq.fsf@gmx.de> References: <7D10EFE37E7CBF4288CAFDFAD3C7932C3466E9@msgswbmnmsp04.wellsfargo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112306830 18214 80.91.229.2 (31 Mar 2005 22:07:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2005 22:07:10 +0000 (UTC) Cc: "'Bug-Gnu-Emacs \(E-mail\)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 01 00:07:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DH7nd-0003Il-Sm for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Apr 2005 00:06:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DH84I-0001sE-VE for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Mar 2005 17:23:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DH84C-0001oo-CV for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2005 17:23:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DH847-0001lu-ID for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2005 17:23:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DH847-0001lr-E5 for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2005 17:23:03 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1DH7l2-00045c-LL for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2005 17:03:21 -0500 Original-Received: (qmail invoked by alias); 31 Mar 2005 22:02:51 -0000 Original-Received: from pD9E70C08.dip0.t-ipconnect.de (EHLO localhost.local) [217.231.12.8] by mail.gmx.net (mp018) with SMTP; 01 Apr 2005 00:02:51 +0200 X-Authenticated: #3708877 Original-To: "Bielawski, Richard G." In-Reply-To: <7D10EFE37E7CBF4288CAFDFAD3C7932C3466E9@msgswbmnmsp04.wellsfargo.com> (Richard G. Bielawski's message of "Mon, 28 Mar 2005 15:16:54 -0800") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 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:11023 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:11023 "Bielawski, Richard G." 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.