From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: new coding system (was: Re: prettify symbols question) Date: Fri, 13 Nov 2020 09:47:16 -0500 Message-ID: References: <834kluzkma.fsf@gnu.org> <831rgyziu3.fsf@gnu.org> <83zh3my2ls.fsf@gnu.org> <83o8k1yb0x.fsf@gnu.org> <83y2j5wio8.fsf@gnu.org> <83sg9dweps.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9548"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 13 15:48:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdaNV-0002H9-2e for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 15:48:41 +0100 Original-Received: from localhost ([::1]:44812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdaNU-0005sb-4Z for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 09:48:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdaM9-00054c-M4 for emacs-devel@gnu.org; Fri, 13 Nov 2020 09:47:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60483) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdaM9-000185-CN for emacs-devel@gnu.org; Fri, 13 Nov 2020 09:47:17 -0500 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kdaM8-0000H6-Lp; Fri, 13 Nov 2020 09:47:16 -0500 In-Reply-To: <83sg9dweps.fsf@gnu.org> (message from Eli Zaretskii on Fri, 13 Nov 2020 15:47:43 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259143 Archived-At: > (define-charset 'lispm > "LISPM" > :short-name "LISPM" > :ascii-compatible-p nil > :code-space [0 255] > :map "LISPM") > > (define-coding-system 'lispm > "Lisp Machine encoding" > :coding-type 'charset > :mnemonic ?L > :charset-list '(lispm)) > > So that sorts it out for the native one, but what should be done for > the Unix friendly mapping? LISPM-ASCII, and similar as above? Something like that. Although I'm not sure about the name. But why do you need the native variant? If we only need one charset, for how it is seen on Unix, we could call that 'lispm'. Right, it is easy enough to convert if one has native files. So I've created a LISPM charmap, and a LISPM charset map based on that. Then calling define-charset and define-coding-system, if I now try to open a Lisp machine file in the lispm coding it seems to be unable to handle the various characters; e.g., #o210. These default coding systems were tried to encode text in the buffer ‘lispm-char-test.text’: (lispm-unix (1 . 0) (59 . 1) (117 . 2) (175 . 3) (233 . 4) (291 . 5) (349 . 6) (407 . 7) (465 . 4194184) (523 . 4194185) (581 . 4194186)) However, each of them encountered characters it couldn’t encode: .... Is there something that I forgot to do? ===File ~/emacs/admin/charsets/glibc/LISPM.gz=============== LISPM % / % version: 1.0 % source: The Lisp Machine Manual, 6th ed. CHARMAP /x00 MIDDLE DOT /x01 DOWNWARDS ARROW /x02 GREEK SMALL LETTER ALPHA /x03 GREEK SMALL LETTER BETA /x04 LOGICAL AND /x05 NOT SIGN /x06 GREEK SMALL LETTER EPSILON /x07 GREEK SMALL LETTER PI /x88 GREEK SMALL LETTER LAMDA /x89 GREEK SMALL LETTER GAMMA /x8a GREEK SMALL LETTER DELTA /x8b UPWARDS ARROW /x8c PLUS-MINUS SIGN /x8d CIRCLED PLUS /x0e INFINITY /x0f PARTIAL DIFFERENTIAL /x10 SUBSET OF /x11 SUPERSET OF /x12 INTERSECTION /x13 UNION /x14 FOR ALL /x15 THERE EXISTS /x16 CIRCLED TIMES /x17 LEFT RIGHT ARROW /x18 LEFTWARDS ARROW /x19 RIGHTWARDS ARROW /x1a NOT EQUAL TO /x1b LOZENGE /x1c LESS-THAN OR EQUAL TO /x1d GREATER-THAN OR EQUAL TO /x1e IDENTICAL TO /x1f LOGICAL OR /x20 SPACE /x21 EXCLAMATION MARK /x22 QUOTATION MARK /x23 NUMBER SIGN /x24 DOLLAR SIGN /x25 PERCENT SIGN /x26 AMPERSAND /x27 APOSTROPHE /x28 LEFT PARENTHESIS /x29 RIGHT PARENTHESIS /x2a ASTERISK /x2b PLUS SIGN /x2c COMMA /x2d HYPHEN-MINUS /x2e FULL STOP /x2f SOLIDUS /x30 DIGIT ZERO /x31 DIGIT ONE /x32 DIGIT TWO /x33 DIGIT THREE /x34 DIGIT FOUR /x35 DIGIT FIVE /x36 DIGIT SIX /x37 DIGIT SEVEN /x38 DIGIT EIGHT /x39 DIGIT NINE /x3a COLON /x3b SEMICOLON /x3c LESS-THAN SIGN /x3d EQUALS SIGN /x3e GREATER-THAN SIGN /x3f QUESTION MARK /x40 COMMERCIAL AT /x41 LATIN CAPITAL LETTER A /x42 LATIN CAPITAL LETTER B /x43 LATIN CAPITAL LETTER C /x44 LATIN CAPITAL LETTER D /x45 LATIN CAPITAL LETTER E /x46 LATIN CAPITAL LETTER F /x47 LATIN CAPITAL LETTER G /x48 LATIN CAPITAL LETTER H /x49 LATIN CAPITAL LETTER I /x4a LATIN CAPITAL LETTER J /x4b LATIN CAPITAL LETTER K /x4c LATIN CAPITAL LETTER L /x4d LATIN CAPITAL LETTER M /x4e LATIN CAPITAL LETTER N /x4f LATIN CAPITAL LETTER O /x50 LATIN CAPITAL LETTER P /x51 LATIN CAPITAL LETTER Q /x52 LATIN CAPITAL LETTER R /x53 LATIN CAPITAL LETTER S /x54 LATIN CAPITAL LETTER T /x55 LATIN CAPITAL LETTER U /x56 LATIN CAPITAL LETTER V /x57 LATIN CAPITAL LETTER W /x58 LATIN CAPITAL LETTER X /x59 LATIN CAPITAL LETTER Y /x5a LATIN CAPITAL LETTER Z /x5b LEFT SQUARE BRACKET /x5c REVERSE SOLIDUS /x5d RIGHT SQUARE BRACKET /x5e CIRCUMFLEX ACCENT /x5f LOW LINE /x60 GRAVE ACCENT /x61 LATIN SMALL LETTER A /x62 LATIN SMALL LETTER B /x63 LATIN SMALL LETTER C /x64 LATIN SMALL LETTER D /x65 LATIN SMALL LETTER E /x66 LATIN SMALL LETTER F /x67 LATIN SMALL LETTER G /x68 LATIN SMALL LETTER H /x69 LATIN SMALL LETTER I /x6a LATIN SMALL LETTER J /x6b LATIN SMALL LETTER K /x6c LATIN SMALL LETTER L /x6d LATIN SMALL LETTER M /x6e LATIN SMALL LETTER N /x6f LATIN SMALL LETTER O /x70 LATIN SMALL LETTER P /x71 LATIN SMALL LETTER Q /x72 LATIN SMALL LETTER R /x73 LATIN SMALL LETTER S /x74 LATIN SMALL LETTER T /x75 LATIN SMALL LETTER U /x76 LATIN SMALL LETTER V /x77 LATIN SMALL LETTER W /x78 LATIN SMALL LETTER X /x79 LATIN SMALL LETTER Y /x7a LATIN SMALL LETTER Z /x7b LEFT CURLY BRACKET /x7c VERTICAL LINE /x7d RIGHT CURLY BRACKET /x7e TILDE % 177 ctl-qm % 200 Null character % 201 Break % 202 Clear % 203 Call % 204 Terminal escape % 205 Macro/backnext % 206 Help % 207 Rubout /x08 BACKSPACE (BS) / Overstrike /x09 CHARACTER TABULATION (HT) / Tab /x0d CARRIAGE RETURN (CR) / Line /x0b LINE TABULATION (VT) / Delete /x0c FORM FEED (FF) / Page /x0a LINE FEED (LF) / Return % 216 Quote % 217 Hold-output % 220 Stop-output % 221 Abort % 222 Resume % 223 Status % 224 End % 225 Roman-i % 226 Roman-ii % 227 Roman-iii % 230 Roman-iv % 231 Hand-up % 232 Hand-down % 233 Hand-left % 234 Hand-right % 235 System % 236 Network % 237-377 reserved for the future END CHARMAP ============================================================ ===File ~/emacs/etc/charsets/LISPM.map====================== # Generated from LISPM in localedata/charmaps of glibc 0x00 0x00B7 0x01 0x2193 0x02-0x03 0x03B1 0x04 0x2227 0x05 0x00AC 0x06 0x03B5 0x07 0x03C0 0x08-0x0D 0x0008 0x0E 0x221E 0x0F 0x2202 0x10-0x11 0x2282 0x12-0x13 0x2229 0x14 0x2200 0x15 0x2203 0x16 0x2297 0x17 0x2194 0x18 0x2190 0x19 0x2192 0x1A 0x2260 0x1B 0x25CA 0x1C-0x1D 0x2264 0x1E 0x2261 0x1F 0x2228 0x20-0x7E 0x0020 0x88 0x03BB 0x89-0x8A 0x03B3 0x8B 0x2191 0x8C 0x00B1 0x8D 0x2295 ============================================================