From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: VC and select-safe-coding-system Date: Mon, 09 Sep 2002 10:08:05 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200209091408.g89E85p18357@rum.cs.yale.edu> References: <1031486626.430.24.camel@eagle> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031580676 24054 127.0.0.1 (9 Sep 2002 14:11:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2002 14:11:16 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17oPFx-0006Fg-00 for ; Mon, 09 Sep 2002 16:11:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17oPpu-0003js-00 for ; Mon, 09 Sep 2002 16:48:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oPFx-0006Pz-00; Mon, 09 Sep 2002 10:11:13 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17oPCy-0006F3-00 for emacs-devel@gnu.org; Mon, 09 Sep 2002 10:08:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17oPCw-0006Er-00 for emacs-devel@gnu.org; Mon, 09 Sep 2002 10:08:08 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oPCw-0006EV-00; Mon, 09 Sep 2002 10:08:06 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g89E85p18357; Mon, 9 Sep 2002 10:08:05 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Andre Spiegel Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7749 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7749 > I've been told that on a file under VC control, a user abort in > select-safe-coding-system can lose data. A few days ago, I asked on > this list whether anyone could tell me the precise circumstances when > this happens. I got no reply. So I've tried to create such a situation > myself, but couldn't spot any such problem. I also inspected the code > carefully, but couldn't see any potential difficulties. The only think I remember related to this is a problem that's independent from VC: If select-safe-coding-system prompts the user and the user aborts with C-g, the file might end up "lost". IIRC, the problem was that when `write-region' is called, the pre-existing file has already been renamed to its backup name, so when write-region calls select-safe-coding-system, the file is temporarily absent. Maybe this bug was "fixed" since my original report by renaming the backup file back to its non-backup name in case of an abort by the user. But I think the problem of having a "temporarily missing file" should be fixed as well (there will always be such a time-window anyway, but we should make it shorter by making sure we don't prompt the user during this time). Stefan