unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: VC and select-safe-coding-system
Date: Mon, 09 Sep 2002 10:08:05 -0400	[thread overview]
Message-ID: <200209091408.g89E85p18357@rum.cs.yale.edu> (raw)
In-Reply-To: 1031486626.430.24.camel@eagle

> 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

  parent reply	other threads:[~2002-09-09 14:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-08 12:03 VC and select-safe-coding-system Andre Spiegel
2002-09-09  0:22 ` Richard Stallman
2002-09-09 14:08 ` Stefan Monnier [this message]
2002-09-09 23:34   ` Richard Stallman
2002-09-10 19:53     ` Andre Spiegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200209091408.g89E85p18357@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).