From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: edited file is deleted when the file cannot be saved because of its coding system Date: Fri, 6 Jun 2003 21:31:11 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200306061231.VAA05318@etlken.m17n.org> References: <3EDB54B4.D1F6462C@innomed.hu> <200306050018.JAA02272@etlken.m17n.org> <2427-Fri06Jun2003143434+0300-eliz@elta.co.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1054903808 19620 80.91.224.249 (6 Jun 2003 12:50:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2003 12:50:08 +0000 (UTC) Cc: engard.ferenc@innomed.hu Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 06 14:50:03 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19OGfT-00055v-00 for ; Fri, 06 Jun 2003 14:50:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19OGfG-0005sz-Iq for gnu-bug-gnu-emacs@m.gmane.org; Fri, 06 Jun 2003 08:49:50 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19OGeI-0005SL-HT for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2003 08:48:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19OGZk-00045D-75 for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2003 08:44:11 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19OGNK-0006Qx-TP for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2003 08:31:19 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h56CVCu01392; Fri, 6 Jun 2003 21:31:12 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h56CVC908304; Fri, 6 Jun 2003 21:31:12 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id VAA05318; Fri, 6 Jun 2003 21:31:11 +0900 (JST) Original-To: eliz@elta.co.il In-reply-to: <2427-Fri06Jun2003143434+0300-eliz@elta.co.il> User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Original-cc: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5255 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5255 In article <2427-Fri06Jun2003143434+0300-eliz@elta.co.il>, "Eli Zaretskii" writes: >> > Select one of the following safe coding systems: > >> utf-8 mule-utf-16-le mule-utf-16-be raw-text emacs-mule > >> no-conversion >> > --------------- >> >> > After that, I have entered C-g to escape from this >> function. > At this point, my original file has gone >> (and, there is no > recovery file yet). >> >> I can't reproduce it. The original file still exists >> after I type C-g at the above point. > Wasn't this a bug in some v21.x of Emacs that was fixed > later? Handa-san, did you try this in the CVS version of > Emacs? Oops, from some point, the mails between me and Fery don't include bug-gnu-emacs@gnu.org in CC:. I'll attach the last mail I sent to him. It seems that the problem is already fixed in HEAD. --- Ken'ichi HANDA handa@m17n.org Date: Fri, 6 Jun 2003 14:22:07 +0900 (JST) From: Kenichi Handa To: engard.ferenc@innomed.hu CC: handa@m17n.org In-reply-to: <3EDF26E1.44AB5C4D@innomed.hu> (message from Fery on Thu, 05 Jun 2003 13:17:53 +0200) Subject: Re: edited file is deleted when the file cannot be saved because of its coding system In article <3EDF26E1.44AB5C4D@innomed.hu>, Fery writes: > I have played a bit more with this problem, and noticed > that it saves a backup with a ~ on the end, so I have the > original file! Sorry, I have missed this. So, if I have > 'test', after ^X^S I will have 'test~' (it is moved, > timestamp etc. is retained), and after quitting '#test#' > (with internal encoding) and 'test~' with the original > content. I confirmed that hahaviour with 21.3 and CVS RC branch. And I found that this problem is now fixed in HEAD branch. In HEAD, at the point of Emacs asking you a coding system, 'test' is surely moved to 'test~', but when you type C-g, 'test~' is moved back to 'test'. >> In C locale, iso-latin-1 has higher priority than utf-8, >> and all bytes in your file are regarded as valid for >> iso-latin-1. (The byte \225 (#x95) is also registered as >> valid latin code in latin-extra-code-table). > After all, emacs do not permit to save it, so from this > point of view it is not a valid iso-latin-1 file for > emacs. :-O Sorry, what I wrote was wrong. In 21.3 and RC, \225 is not yet registered as a valid latin code, but has a bug in code detection routine. This bug is already fixed in the HEAD branch. --- Ken'ichi HANDA handa@m17n.org