From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22436: read-coding-system uses wrong default when called from write-file Date: Sat, 23 Jan 2016 07:56:05 +0200 Message-ID: <83vb6k6dqi.fsf@gnu.org> References: <83zivx5mwu.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1453528579 18632 80.91.229.3 (23 Jan 2016 05:56:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 05:56:19 +0000 (UTC) Cc: 22436@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 23 06:56:08 2016 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 1aMrB9-0002qX-Jp for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 06:56:07 +0100 Original-Received: from localhost ([::1]:56337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMrB8-0002tq-Qh for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 00:56:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMrB5-0002qs-LH for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 00:56:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMrB4-0007MK-Nh for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 00:56:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMrB4-0007ME-KG for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 00:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aMrB4-00075G-CH for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 00:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2016 05:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22436-submit@debbugs.gnu.org id=B22436.145352855727218 (code B ref 22436); Sat, 23 Jan 2016 05:56:02 +0000 Original-Received: (at 22436) by debbugs.gnu.org; 23 Jan 2016 05:55:57 +0000 Original-Received: from localhost ([127.0.0.1]:58242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMrAz-00074w-Mf for submit@debbugs.gnu.org; Sat, 23 Jan 2016 00:55:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59465) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMrAy-00074l-Iw for 22436@debbugs.gnu.org; Sat, 23 Jan 2016 00:55:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMrAo-0007LQ-BK for 22436@debbugs.gnu.org; Sat, 23 Jan 2016 00:55:51 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMrAo-0007LM-81; Sat, 23 Jan 2016 00:55:46 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1673 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aMrAn-0008KM-Lx; Sat, 23 Jan 2016 00:55:46 -0500 In-reply-to: (message from Richard Copley on Fri, 22 Jan 2016 23:23:40 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:111872 Archived-At: > From: Richard Copley > Date: Fri, 22 Jan 2016 23:23:40 +0000 > Cc: 22436@debbugs.gnu.org > > On 22 January 2016 at 21:23, Eli Zaretskii wrote: > >> From: Richard Copley > >> Date: Fri, 22 Jan 2016 19:31:07 +0000 > >> > >> >From "emacs -Q", enter a ‘ in the scratch buffer (e.g., by typing "C-x > >> 8 ["). Save or write the buffer. The minibuffer prompts "Select coding > >> system (default chinese-iso-8bit): ". > > > > Why do you think that's wrong? > > Of course it's wrong. What do you mean? Wrong how? in what way? what did you expect to happen instead? Your locale's default encoding, cp1252, cannot encode this character, so Emacs asked you to provide an encoding that can, and offered chinese-iso-8bit as the default. An encoding can be considered "wrong" if it fails to encode a character. AFAICS, chinese-iso-8bit does succeed in encoding it, so the above definition of "wrong" doesn't fit. In addition, there should be a *Warning* buffer displayed where you have a long list of encodings Emacs knows about that can encode this character; chinese-iso-8bit is just one of them, but the text there tells you to select any one of them. Do you see that buffer displayed? Given all this information, please do tell why you think what Emacs did was wrong, and what did you think Emacs should have done instead. Thanks.