From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: What does `undecided' do for encoding text? Date: Mon, 16 Feb 2009 08:47:08 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234792048 5430 80.91.229.12 (16 Feb 2009 13:47:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2009 13:47:28 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 16 14:48:44 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZ3py-0000DX-Rt for ged-emacs-devel@m.gmane.org; Mon, 16 Feb 2009 14:48:43 +0100 Original-Received: from localhost ([127.0.0.1]:57646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZ3oe-00074G-Vt for ged-emacs-devel@m.gmane.org; Mon, 16 Feb 2009 08:47:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZ3oY-00073h-Gl for emacs-devel@gnu.org; Mon, 16 Feb 2009 08:47:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZ3oW-00073U-2G for emacs-devel@gnu.org; Mon, 16 Feb 2009 08:47:13 -0500 Original-Received: from [199.232.76.173] (port=46338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZ3oV-00073R-SP for emacs-devel@gnu.org; Mon, 16 Feb 2009 08:47:11 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:15931 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZ3oU-0003Zz-7q; Mon, 16 Feb 2009 08:47:10 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhcFAKz8mElMCpTK/2dsb2JhbACBbs5uhBwGgzI X-IronPort-AV: E=Sophos;i="4.38,216,1233550800"; d="scan'208";a="33933547" Original-Received: from 76-10-148-202.dsl.teksavvy.com (HELO pastel.home) ([76.10.148.202]) by ironport2-out.teksavvy.com with ESMTP; 16 Feb 2009 08:47:09 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id BAB1A867B; Mon, 16 Feb 2009 08:47:08 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Mon, 16 Feb 2009 20:44:44 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109105 Archived-At: >>>> It looks like `undecided' works the same as `raw-text' for encoding >>>> text. Is that true in general? >> > Yes. More exactly, it is the same as `raw-text-unix'. >> Which I prefer calling `binary'. > What do you mean by "calling"? > raw-text-unix and binary are different when > coding-system-change-text-conversion and > coding-system-change-eol-conversion are called. Good point, I tend to forget about this. But in the context of "how is `undecided' treated during write", this doesn't make any difference. >>>> I think this should be reflected in the ELisp manual. >> > I don't think so because it is just a fallback behavior, and >> > Elisp programmer should avoid specifying `undecided' on >> > encoding. >> Then why do we even allow it? We should signal an error. > It seems difficult to find a good point of signaling an > error. At least, visiting an ascii only file, inputting > ascii only, and saving it should be a valid operation. At > that time, buffer-file-coding-system is undecided-unix. Then an error should only be signalled when we end up trying to encode a non-ASCII char. Stefan