unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* VC and select-safe-coding-system
@ 2002-09-08 12:03 Andre Spiegel
  2002-09-09  0:22 ` Richard Stallman
  2002-09-09 14:08 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Andre Spiegel @ 2002-09-08 12:03 UTC (permalink / raw)


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.

If anyone has any more information on this matter, please let me know.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: VC and select-safe-coding-system
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2002-09-09  0:22 UTC (permalink / raw)
  Cc: emacs-devel

    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.

I have seen this happen, too.  What happened, I think,
is that the file had already been renamed to a backup file.
So there was no longer any file with the visited name.

To see this problem, I think you need to set vc-make-backup-files to t.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: VC and select-safe-coding-system
  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
  2002-09-09 23:34   ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2002-09-09 14:08 UTC (permalink / raw)
  Cc: emacs-devel

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: VC and select-safe-coding-system
  2002-09-09 14:08 ` Stefan Monnier
@ 2002-09-09 23:34   ` Richard Stallman
  2002-09-10 19:53     ` Andre Spiegel
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2002-09-09 23:34 UTC (permalink / raw)
  Cc: spiegel, emacs-devel

    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.

I had forgotten making that change.
That might indeed have fixed it.  

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

That may require substantial rearrangement.  Anyone want to see how much?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: VC and select-safe-coding-system
  2002-09-09 23:34   ` Richard Stallman
@ 2002-09-10 19:53     ` Andre Spiegel
  0 siblings, 0 replies; 5+ messages in thread
From: Andre Spiegel @ 2002-09-10 19:53 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

On Tue, 2002-09-10 at 01:34, Richard Stallman wrote:

> I had forgotten making that change.
> That might indeed have fixed it.  

So I will consider the issue as closed.  If anything along these lines
happens again, let me know.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-09-10 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2002-09-09 23:34   ` Richard Stallman
2002-09-10 19:53     ` Andre Spiegel

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