From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Olum Newsgroups: gmane.emacs.bugs Subject: infinite loop from unwriteable backup files Date: Tue, 22 Jan 2008 12:53:29 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1201028358 28099 80.91.229.12 (22 Jan 2008 18:59:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2008 18:59:18 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 22 19:59:36 2008 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 1JHOLM-0004VZ-Ty for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jan 2008 19:59:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHOKw-0007HD-T3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jan 2008 13:59:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHNJT-0005w4-Bd for bug-gnu-emacs@gnu.org; Tue, 22 Jan 2008 12:53:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHNJS-0005uT-9v for bug-gnu-emacs@gnu.org; Tue, 22 Jan 2008 12:53:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHNJS-0005uF-56 for bug-gnu-emacs@gnu.org; Tue, 22 Jan 2008 12:53:30 -0500 Original-Received: from cosmos.phy.tufts.edu ([130.64.83.16]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JHNJR-0004lP-Ts for bug-gnu-emacs@gnu.org; Tue, 22 Jan 2008 12:53:30 -0500 Original-Received: from kdo by cosmos.phy.tufts.edu with local (Exim 4.63) (envelope-from ) id 1JHNJR-0007Rs-Dk for bug-gnu-emacs@gnu.org; Tue, 22 Jan 2008 12:53:29 -0500 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 22 Jan 2008 13:59:01 -0500 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:17409 Archived-At: In GNU Emacs 22.1.1 (x86_64-mandrake-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-09-19 on deborah.mandriva.com, modified by Mandriva If you try to modify a file in a write-protected directory in which there is already a backup file for the file you are editing, then emacs goes into an infinite loop when you attempt to save the modified buffer. To reproduce this bug: mkdir test touch test/foo.bar touch test/foo.bar~ chmod ugo-w test emacs test/foo.bar Modify the buffer, type C-x C-s. Emacs runs forever. Enclosed below is a backtrace obtained by (previously) setting debug-on-quit and typing C-g as it tries to save the file. Ken ---------------------------------------------------------------------- delete-file("/home/kdo/test/foo.bar~") byte-code("ÂÃďˆÅ ÂÆ$ˆÂ‡" [from-name to-name nil (delete-file to-name) ((file-error)) copy-file t] 5) backup-buffer-copy("/home/kdo/test/foo.bar" "/home/kdo/test/foo.bar~" 420) byte-code("„c