From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.bugs Subject: bug#13505: Bug#696026: emacs24: file corruption on saving Date: Sat, 19 Jan 2013 22:09:28 -0600 Message-ID: <877gn8ijgn.fsf@trouble.defaultvalue.org> References: <20121215223809.GA7549@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358655013 15150 80.91.229.3 (20 Jan 2013 04:10:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2013 04:10:13 +0000 (UTC) Cc: 696026-forwarded@bugs.debian.org, Vincent Lefevre , 696026@bugs.debian.org To: 13505@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 20 05:10:31 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwmEo-0000yp-Nz for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2013 05:10:30 +0100 Original-Received: from localhost ([::1]:54456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmEX-0004Wv-Eg for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2013 23:10:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmET-0004Wp-Ce for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:10:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwmER-0004ri-IV for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:10:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmER-0004rZ-EZ for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:10:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TwmFK-0003Y4-Gx for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rob Browning Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jan 2013 04:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13505 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135865503413600 (code B ref -1); Sun, 20 Jan 2013 04:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jan 2013 04:10:34 +0000 Original-Received: from localhost ([127.0.0.1]:40944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwmEr-0003XJ-Pk for submit@debbugs.gnu.org; Sat, 19 Jan 2013 23:10:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43586) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwmEp-0003XB-1o for submit@debbugs.gnu.org; Sat, 19 Jan 2013 23:10:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwmDt-0004f6-JP for submit@debbugs.gnu.org; Sat, 19 Jan 2013 23:09:34 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:35797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmDt-0004f2-GT for submit@debbugs.gnu.org; Sat, 19 Jan 2013 23:09:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmDs-0004RE-7Q for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:09:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwmDq-0004ek-Cz for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:09:32 -0500 Original-Received: from defaultvalue.org ([70.85.129.156]:36527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwmDq-0004eg-6h for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2013 23:09:30 -0500 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 4821A90D24; Sat, 19 Jan 2013 22:14:07 -0600 (CST) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 4FE4114E078; Sat, 19 Jan 2013 22:09:28 -0600 (CST) In-Reply-To: <20121215223809.GA7549@xvii.vinc17.org> (Vincent Lefevre's message of "Sat, 15 Dec 2012 23:38:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70076 Archived-At: (If possible, please preserve the *-forwarded address in any replies.) The following bug was reported to Debian. I've tested both the Debian emacs24 package, and current upstream emacs-24, as of: Author: Leo Liu Date: Sat Jan 19 02:35:44 2013 +0800 Prune erroneous values in dired-get-marked-files In both cases, I was able to reproduce the reported issue. Please let me know if I can provide further information. Vincent Lefevre writes: > Package: emacs24 > Version: 24.2+1-1 > Severity: grave > Justification: causes non-serious data loss > > The file "file1" (attached) has the following contents: > > 00000000 6c e2 80 99 c3 a9 0a 74 65 73 74 e9 0a |l......test..| > > 1. Open "file1" with "emacs -Q". It is regarded as > an in-is13194-devanagari-unix file. > > 2. Type M-: (set-buffer-modified-p t) to mark the buffer as modified > (so that one can save it). > > 3. Save the file with C-x C-s. It is proposed: > > [...] > Select one of the safe coding systems listed below, > or cancel the writing with C-g and edit the buffer > to remove or modify the problematic characters, > or specify any other coding system (and risk losing > the problematic characters). > > raw-text emacs-mule no-conversion > > 4. Choose raw-text (the default) or no-conversion. One can assume > that the file will not be modified. But it gets corrupted: one > obtains a file "file2" (attached) with the following contents: > > 00000000 6c e0 a5 88 80 99 e0 a4 a5 e0 a4 8a 0a 74 65 73 |l............tes| > 00000010 74 e0 a4 bc 0a |t....| > > Note: Actually "file1" has mixed UTF-8 and ISO-8859-1 contents due to > a user error. But due to this bug, an attempt to fix the problem with > Emacs makes things even worse! BTW, I had the same problem in the past > when attempting to edit an mbox file with Emacs (in this case, having > mixed UTF-8 and ISO-8859-1 contents is normal). How Emacs interprets > such contents doesn't matter, but by default, it mustn't corrupt the > file on saving. > > There is no such problem with GNU Emacs 23.4.1 (Debian package > emacs23 23.4+1-4). > > -- System Information: > Debian Release: 7.0 > APT prefers unstable > APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') > Architecture: amd64 (x86_64) > > Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores) > Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > > Versions of packages emacs24 depends on: > ii emacs24-bin-common 24.2+1-1 > ii gconf-service 3.2.5-1+build1 > ii libasound2 1.0.25-4 > ii libatk1.0-0 2.4.0-2 > ii libc6 2.13-37 > ii libcairo2 1.12.2-2 > ii libdbus-1-3 1.6.8-1 > ii libfontconfig1 2.9.0-7.1 > ii libfreetype6 2.4.9-1 > ii libgconf-2-4 3.2.5-1+build1 > ii libgdk-pixbuf2.0-0 2.26.1-1 > ii libgif4 4.1.6-10 > ii libglib2.0-0 2.33.12+really2.32.4-3 > ii libgnutls26 2.12.20-2 > ii libgomp1 4.7.2-4 > ii libgpm2 1.20.4-6 > ii libgtk2.0-0 2.24.10-2 > ii libice6 2:1.0.8-2 > ii libjpeg8 8d-1 > ii libm17n-0 1.6.3-2 > ii libmagickcore5 8:6.7.7.10-5 > ii libmagickwand5 8:6.7.7.10-5 > ii libncurses5 5.9-10 > ii libotf0 0.9.12-2 > ii libpango1.0-0 1.30.0-1 > ii libpng12-0 1.2.49-3 > ii librsvg2-2 2.36.1-1 > ii libselinux1 2.1.9-5 > ii libsm6 2:1.2.1-2 > ii libtiff4 3.9.6-9 > ii libtinfo5 5.9-10 > ii libx11-6 2:1.5.0-1 > ii libxft2 2.3.1-1 > ii libxml2 2.8.0+dfsg1-7 > ii libxpm4 1:3.5.10-1 > ii libxrender1 1:0.9.7-1 > ii zlib1g 1:1.2.7.dfsg-13 > > emacs24 recommends no packages. > > Versions of packages emacs24 suggests: > ii emacs24-common-non-dfsg 24.2+1-1 > > -- no debconf information -- 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