From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: handa@gnu.org (K. Handa) Newsgroups: gmane.emacs.devel Subject: Re: Creating a coding system Date: Thu, 25 Dec 2014 00:06:22 +0900 Message-ID: <87a92d2ikx.fsf@gnu.org> References: <87h9wmd8ey.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419433611 3250 80.91.229.3 (24 Dec 2014 15:06:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Dec 2014 15:06:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 24 16:06:44 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Y3nWL-00086n-EC for ged-emacs-devel@m.gmane.org; Wed, 24 Dec 2014 16:06:41 +0100 Original-Received: from localhost ([::1]:48633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3nWK-0003zb-SJ for ged-emacs-devel@m.gmane.org; Wed, 24 Dec 2014 10:06:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3nW8-0003zV-F1 for emacs-devel@gnu.org; Wed, 24 Dec 2014 10:06:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3nW5-0002LW-9A for emacs-devel@gnu.org; Wed, 24 Dec 2014 10:06:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3nW5-0002LS-5f for emacs-devel@gnu.org; Wed, 24 Dec 2014 10:06:25 -0500 Original-Received: from fl1-122-134-99-48.iba.mesh.ad.jp ([122.134.99.48]:59776 helo=tinhau) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Y3nW4-000147-IA; Wed, 24 Dec 2014 10:06:24 -0500 Original-Received: from handa by tinhau with local (Exim 4.80) (envelope-from ) id 1Y3nW2-0005F2-3J; Thu, 25 Dec 2014 00:06:22 +0900 In-Reply-To: <87h9wmd8ey.fsf@fencepost.gnu.org> (message from David Kastrup on Tue, 23 Dec 2014 10:25:57 +0100) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180642 Archived-At: In article <87h9wmd8ey.fsf@fencepost.gnu.org>, David Kastrup writes: > > The other method is to use CCL (i.e :coding-type 'ccl), but, > > if the combination of the charset decoding and translation > > table works, it's faster than running CCL code. > The translation table is not happy about translating things to nothing. > Apparently that makes the calculation of the reverse translation go > wrong. Ah, perhaps make-translation-table-from-alist should have optional argument to suppress building of reverse map, say no-reverse-mmap. Just for decoding, we don't need a reverse map. > If you have time to spare on that topic, I'd rather you spend it on > putting some more info in the Elisp manual or at least the > define-ccl-program and define-coding-system doc strings. Ok, I'll work on it. > And the following afterthought in define-ccl-program is quite opaque as > well: > TRANSLATE := [...] > LOOKUP := [...] > MAP := They were introduced to support Unicode handling in Emacs 22 and prior (i.e. pre-Unicode emacsen). I think we can get rid of them (or at least make them more simple and usable). By the way, long ago, I had a plan of converting restricted Elisp code to CCL, and hide those criptic CCL programs from users. Unfortunately, I got busy for the other work, and couldn't realize that plan. :-( > There is also nothing in the DOC string of `define-coding-system' or the > Elisp manual that would help in guessing what kind of options to choose > for what kind of task. > The purpose/definition of coding-type emacs-mule (particularly post > Emacs-23) is not given, or what the various options with coding-type > iso-2022 are. It is not clear when one would use coding-type raw-text > and when utf-8 (and how does utf-8 relate to emacs-mule?). I'll try to document them. --- K.Handa handa@gnu.org