GNU bug report logs - #13505
Bug#696026: emacs24: file corruption on saving

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sun, 20 Jan 2013 04:11:02 UTC

Severity: normal

Merged with 13377

Found in version 24.3.50

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 13505 <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 696026-forwarded <at> bugs.debian.org, Kenichi Handa <handa <at> gnu.org>,
	vincent <at> vinc17.net, 696026 <at> bugs.debian.org, 13505 <at> debbugs.gnu.org
Subject: Re: bug#13505: Bug#696026: emacs24: file corruption on saving
Date: Sun, 20 Jan 2013 11:31:12 -0600
Eli Zaretskii <eliz <at> gnu.org> writes:

> More to the point: there seems to be a fundamental misunderstanding
> here regarding the effect of selecting an encoding at save time.  It
> sounds like the OP thought that selecting a "literal" encoding, such
> as raw-text, which is supposed to leave the binary stream unaltered
> (apart of the EOL format), will ensure that a buffer will be saved
> exactly as it was originally found on disk.  But this is false.  What
> raw-text and no-conversion do is to write out the _internal_
> representation of each character without any conversions.  The
> original encoded form of the characters as found on disk at visit time
> _cannot_ be recovered by saving with raw-text, because that encoded
> form is lost without a trace when the file is _visited_ and decoded
> into the internal representation.  The only information that's left is
> the coding-system used to decode the characters.  But since the file's
> encoding in this case is inconsistent, that coding-system cannot be
> used to save it back (Emacs will not let you do so, as demonstrated in
> the report), and therefore the original form cannot be recovered this
> way.

Ahh, right; that make sense to me.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




This bug report was last modified 11 years and 229 days ago.

Previous Next


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