From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pietru@caramail.com Newsgroups: gmane.emacs.devel Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ... Date: Thu, 4 Feb 2021 04:51:04 +0100 Message-ID: References: <87v9b8mvpb.fsf@telefonica.net> <87r1lwmrgc.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 04 04:51:45 2021 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 1l7VgH-0005Z3-3G for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Feb 2021 04:51:45 +0100 Original-Received: from localhost ([::1]:44858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7VgG-00052q-6B for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Feb 2021 22:51:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Vfg-0004d6-Cy for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:51:08 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:37641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Vfe-00032C-JZ for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:51:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612410664; bh=It7ofI+y6W19IoEOhbMSjaHVsSNrpSQ9zeG/jsJosSI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Swn1vx1b23OBJebXi1VF3w3Q28YEo6AXeUbMa5eHFKFJhxw135jA0yH/oY6yfokry IL7K3nInGntC4YvMySkkRlCtjChzRv4Y/vJBhuxpsnXzRv9HjyQdnFSJRvIoGo13dV 71aUsgHUqafCOZ2SxW0fZV0p5P3lRdWcoWp9AyCA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Thu, 4 Feb 2021 04:51:04 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87r1lwmrgc.fsf@telefonica.net> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ylhC74ROKQbdvD3PnWZKt0b7usEdgFhp3gJqYANgwU9bSCGljdhJQHwhG+PFt7MDjOC7w RCQyaXOnphFqj7YalLl8r+EMpyEZFtFPl3Yn5VaTHpgPGLzZKOm8K1Qth8TUXDYpERy8iZTvID4T h+hklBgvM6lCJjTQBYCbIAcDUCZpYDwlrl05PrvmNzOAKOQOQiZcRXPmjXgNG+DJArLhreK3vJza 01RSJ+zNbDRfJ3gBgYScG1je+jiYvQp3+JeuFCy6J71msGHi/s5NLZnOYDbw7JyQrih8zv3HBG38 qo= X-UI-Out-Filterresults: notjunk:1;V03:K0:rwdVeLA+VPc=:H9rWZOxtW7m355V5VkmXYl KYoiTXNgrGa9hlEUsin4ezMM7uwBxIFQtr0k8rvUehEC50zASCsm64c++jeKe8XtHcpu7mKUV lUS0T1tbjHbP4Y7iW1mk3rINpy5qS/GcWXAPCLdaJ+zPr+detyCvgLQibIP9U7Mx1vbzl6Yjw XcqsAYxktN46OgqFtuFKFkv+d6QsPRc7J6TsWasUwuUMuzAUi9wNEyJ1Dx7qrt3YZoJ2L6BDs W2GxCZt/WAA/OoB+j8iHCamkmz1AMFPbZFuXxLMnoNZ95e7vknX9i5d2f4G6uliy7lGycfhmW x40hbsOQl3ilYDPtqz6EZ4bbOP6pRs0NVOwuArDJ54wJuKNHlz7vd94Y+AGIQe1n2U8/05MYV ccpPcP18vv7r8v59FOdQsqvU2o7H9J/xn+6fwRfTIuUpJVPWrwVvLQEHbW2xmlnzj18C6vDky Sl6UpFPLb4MBQTXiy7qUA/6zJ6plg9reVmSbPDbv1P/S52s6NZZ9rkossXVvr6Fbbf7zeA8Lk JBilJmDj1D9QbnyijldJpM3rAwW/52hAvHWhZ9wBJ4f/LHKhoW+4waCmYslrpxgCtKMu/e38x 8YNUcfmxImDy4= Received-SPF: pass client-ip=212.227.17.20; envelope-from=pietru@caramail.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:263838 Archived-At: Recently texinfo has been improved to better handle the display of mathematics=2E For instance, it now also uses mathjax where one is able to scale the text=2E Traditionally texinfo did have some support for mathematical expressions, but since last year the support has been expanded considerably=2E > Sent: Thursday, February 04, 2021 at 3:39 PM > From: "=C3=93scar Fuentes" > To: emacs-devel@gnu=2Eorg > Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" =2E=2E=2E > > pietru@caramail=2Ecom writes: >=20 > >> The docstring of prettify-symbols-alist says: > >>=20 > >> Each element looks like (SYMBOL =2E CHARACTER), where the symbol > >> matching SYMBOL (a string, not a regexp) will be shown as CHARACTER > >> instead=2E > >>=20 > >> so no, SYMBOL *must* *not* be a regexp=2E > >>=20 > >> I can't reproduce the problem you are describing=2E After starting Em= acs: > >>=20 > >> emacs -Q > >>=20 > >> if I evaluate this in *scratch*: > >>=20 > >> (push '("\\alpha" =2E ?=CE=B1) prettify-symbols-alist) > >>=20 > >> then open a =2Etex file, write \alpha_i, M-x prettify-symbols-alist, = the > >> string is transformed to =CE=B1_i=2E > >>=20 > >> Please note that the definition of SYMBOL depends on the major mode o= f > >> the buffer, so make sure that your current major mode is tex-mode=2E > >>=20 > > > > No, the major mode is texinfo-mode=2E Texinfo allows mathematics to b= e > > displayed using the usual tex expressions=2E Could this functionality > > be put for use in texinfo-mode? >=20 > I missed the texinfo bit on your original message, sorry=2E >=20 > Supporting what you want would require either changing what texinfo > considers a symbol or changing prettify-symbols-mode to work on > something else instead of symbols=2E >=20 > Probably the easiest route for you is to derive a mode from texinfo-mode > that modifies the syntax table defined in texinfo=2Eel to suit your need= s > (see "Syntax Tables" in the Elisp manual)=2E >=20 > If you insist on changing texinfo-mode itself, put those modifications > on the mode's syntax table and submit the change to the Emacs > maintainers, but my guess is that you will need to give pretty solid > reasons for the change to be accepted, and then wait a long time until > Emacs 28 is released and becomes widespread enough among your target > users=2E >=20 >=20 >