GNU bug report logs - #18141
24.4.50; saving .gz file breaks file coding

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Tue, 29 Jul 2014 07:01:02 UTC

Severity: important

Found in version 24.4.50

Fixed in version 24.3.93

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 18141 <at> debbugs.gnu.org, yamaoka <at> jpl.org
Subject: bug#18141: 24.4.50; saving .gz file breaks file coding
Date: Wed, 6 Aug 2014 18:43:16 +0200
On 2014-08-06 17:36:00 +0300, Eli Zaretskii wrote:
>  . Bug#13522, which these changes were trying to solve, happens when
>    Emacs is killed by an external signal during the time between
>    backing up the original file and writing the new one.  (This time
>    can be quite large if write-region asks the user to choose a
>    suitable encoding for the new content.)  That is a pretty rare
>    situation, and IMO it's perfectly OK for Emacs to leave just the
>    backup file if it was brutally killed during that time window.

No, this is not rare (Emacs seems to be confused on files that
have several encodings, such as mailboxes) and I sometimes hit
Ctrl-C in the terminal (from which Emacs was started) to discard
any change. And that's not OK to only leave the backup file,
since it can be removed or overwritten pretty quickly, before
I notice that the original file is gone. In such a case, I would
lose the entire file.

But why isn't the backup done just before the file is actually
written?

BTW, I notice that Bug#13522 doesn't occur when the file is in a
sshfs directory.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 10 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.