From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: How to translate LaTeX into UTF-8 in Elisp? Date: Mon, 03 Jul 2017 11:16:12 +0200 Message-ID: <87van9dgo3.fsf@jane> References: <87shpyfj2q.fsf@mbork.pl> <87bmp2rud7.fsf@jane> <87y3s6vzwg.fsf@debian.uxu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499073416 1818 195.159.176.226 (3 Jul 2017 09:16:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2017 09:16:56 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50 Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 03 11:16:50 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRxTM-0008Qu-Oy for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 11:16:48 +0200 Original-Received: from localhost ([::1]:33547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRxTQ-00078G-IE for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 05:16:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRxSz-000780-AN for help-gnu-emacs@gnu.org; Mon, 03 Jul 2017 05:16:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRxSv-0008EA-RL for help-gnu-emacs@gnu.org; Mon, 03 Jul 2017 05:16:25 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:45724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRxSv-0008DX-K6 for help-gnu-emacs@gnu.org; Mon, 03 Jul 2017 05:16:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 1B0D5E6585; Mon, 3 Jul 2017 11:16:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9eV38MLeomxz; Mon, 3 Jul 2017 11:16:17 +0200 (CEST) Original-Received: from localhost (unknown [83.13.149.242]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 5694AE64EB; Mon, 3 Jul 2017 11:16:17 +0200 (CEST) In-reply-to: <87y3s6vzwg.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113667 Archived-At: On 2017-07-03, at 07:43, Emanuel Berg wrote: > Marcin Borkowski writes: > >> I'm revisiting this old thread now. Since I got no >> satisfying answers back then, here is my plan for >> solution. I'm going first to map \', \` etc. >> onto /names/ (this is a rather short list!), >> construct a Unicode name of the character I want and >> then use =ucs-names=. >> >> For instance, \' maps to "ACUTE", then \'a will map >> to "LATIN SMALL LETTER A ACUTE" and this can be fed >> into =char-from-name=. >> >> It is a horrible hack > > On the contrary. Add another layer of abstraction. > > If you setup the names consistently it is even > a good-looking solution. I'm not sure whether I follow you here. Why should *I* setup the names? They are in ucs-names (as I said), and they are official Unicode names. It is still a hack, since it relies on the Unicode names being correct. Have you seen this? https://codepoints.net/U+FE18?lang=en Notice the typo in the name. It's in the standard (somehow it slipped through;-)), so the typo is there forever (or rather, for as long as Unicode is going to be around). Best, -- Marcin Borkowski