From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: backup-buffer-copy loops if old backup can't be deleted Date: Wed, 22 Aug 2007 11:44:12 +0200 Message-ID: <46CC056C.5030603@gmx.at> References: <46CAD810.3050904@gmx.net> <46CAF8AC.9070809@gmx.at> <46CAFBEF.2040606@gmx.net> <46CB529F.7010008@gmx.at> <16sl6cy2t8.fsf@fencepost.gnu.org> <46CBFE2E.9050606@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1187776078 6502 80.91.229.12 (22 Aug 2007 09:47:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2007 09:47:58 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Martin von Gagern Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 11:47:55 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1INmod-0005dK-0p for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 11:47:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INmob-0000CK-J6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 05:47:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INmkj-0007je-Tp for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 05:43:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INmki-0007jH-BA for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 05:43:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INmkh-0007jA-D7 for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 05:43:51 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1INmkg-0005h2-7X for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2007 05:43:50 -0400 Original-Received: (qmail invoked by alias); 22 Aug 2007 09:43:48 -0000 Original-Received: from N715P018.adsl.highway.telekom.at (EHLO [62.47.33.82]) [62.47.33.82] by mail.gmx.net (mp040) with SMTP; 22 Aug 2007 11:43:48 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18xm28XQ5wxIyUemL981eCFzugZtA1wNjZrppgj6d Av22lj69YRTjHG User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <46CBFE2E.9050606@gmx.net> X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:16418 Archived-At: >>! (dir (or (file-name-directory to-name) >>! default-directory))) >>! ;; Can't delete or create files in a read-only directory. >>! (unless (file-writable-p dir) >>! (signal 'file-error (list "Directory is not writable" dir))) > > > This seems a good idea, as deleting a backup file we won't be able to > recreate would be a bad move. However I guess there are filesystems out > there where a file might be undeletable even if its directory is > writable. We could check (file-writable-p to-name) here too. >>+ ;; FIXME does that every actually happen in practice? >>+ ;; This is a potential infloop, which seems bad... > > > The more I think about it, the rarer this seems to me. In my last mail I > voted for a fixed maximum loop count, but by now I would even drop all > loops; they are simply not worth the effort I guess. More so because saving and backing up can be emergency operations.