From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What does `undecided' do for encoding text? Date: Tue, 10 Feb 2009 11:22:15 +0200 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1234257753 12298 80.91.229.12 (10 Feb 2009 09:22:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 09:22:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 10 10:23:48 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 1LWoqD-0003t0-Uc for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 10:23:42 +0100 Original-Received: from localhost ([127.0.0.1]:38145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWoot-0001iT-UT for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 04:22:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWoop-0001iF-AS for emacs-devel@gnu.org; Tue, 10 Feb 2009 04:22:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWoon-0001i3-7f for emacs-devel@gnu.org; Tue, 10 Feb 2009 04:22:14 -0500 Original-Received: from [199.232.76.173] (port=38247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWoon-0001i0-2c for emacs-devel@gnu.org; Tue, 10 Feb 2009 04:22:13 -0500 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:63223) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWoom-0001KO-Ks for emacs-devel@gnu.org; Tue, 10 Feb 2009 04:22:12 -0500 Original-Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KEU00100F6TJW00@i_mtaout5.012.net.il> for emacs-devel@gnu.org; Tue, 10 Feb 2009 11:22:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.128.7]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KEU005YTFDGLXD0@i_mtaout5.012.net.il>; Tue, 10 Feb 2009 11:22:29 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:108943 Archived-At: > From: Kenichi Handa > CC: emacs-devel@gnu.org > Date: Tue, 10 Feb 2009 16:01:10 +0900 > > In article , Eli Zaretskii writes: > > > 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'. Thanks. > > 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. This may have nothing to do with what the programmer did. My use case was in Rmail: if the original message had non-ASCII text encoded with QP or B64, Rmail would (correctly) return `undecided' when it detects the message encoding. Suppose you then edit the message and add non-ASCII characters as raw bytes, e.g. by base64-decode-region, and type "C-c C-c". rmail-cease-edit now needs to encode the text and put it back into the mbox buffer, and the immediate choice it has for the pertinent coding-system is to use buffer-file-coding-system of the buffer where the message was edited. But the value of buffer-file-coding-system in that buffer is `undecided'... If you say that using `undecided' in encoding is ``considered harmful'', we should at least say that in the ELisp manual. Although in the use case I described `undecided' did exactly what's right, and the only other correct choice is `raw-text'.