[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VC and select-safe-coding-system

From: Stefan Monnier
Subject: Re: VC and select-safe-coding-system
Date: Mon, 09 Sep 2002 10:08:05 -0400

> 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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]