From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.devel Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ... Date: Thu, 4 Feb 2021 04:46:09 +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="3468"; 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:47:15 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 1l7Vbu-0000nT-Uq for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Feb 2021 04:47:14 +0100 Original-Received: from localhost ([::1]:41772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7Vbu-0003VN-18 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Feb 2021 22:47:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Vav-0002yG-HJ for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:46:13 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:35195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Vat-0000q9-Cw for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:46:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612410369; bh=RqQ3ab1yaJueOAOyIrmbP77TmvU8p6CZwmkY6ivE4jo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=c+eE7YWfwBXVT0zLZEdbIW/9vqO4cycjLPsOMMYHrPBWjH9McBPpWDQHW6UCn2pHp f0g6o6IjD2D1DZylaOBHZcVfe8/YhyfhlSH8WIjPAIm42XET6b/PQhKaXexz42bw44 DjTjcqumPT39VBbXGZO8uX0ME7F33pzE9fJk358k= 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:46:09 +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:CEMja/lUpej+49jhdlJYtQ80WWI/gBMyVEooZpZ4hKSjimgPhulhj6qJcIX2XWBlazlqr l7YQchG90nREmCOa4CPmLFy7neXA6wwINd4Pdln5a/UvuMGHiakChEM+/+jcgSR04A0uNJhw9JHv N/BZi3DXioT/C1aAq5YVYFxP9hPcqxWmtRBtdedrxY0uJYwRiGtkqoo/KdEbdFCH4nCslmsmJuIM zqoDtjJacXcC96tcO63z5wVxqSJVrD7E7LMOKTiVA4TCKh8PCbGvi+p0KJiNktVu22e0itBh7LpF LY= X-UI-Out-Filterresults: notjunk:1;V03:K0:nZp5Hl63Qug=:mTT90lDEIOiANMBK7kwiPd mQ4BYpxhEe51SgVpNXJZQu7dEhiCrbbSUzc8nk+7CR58MvkcBIxJtnETLzKm1tqtAbTAxbvX+ Sc71F2xYCM40dKiO5Me4b240zT+ZodyzM2CPVGwKu1TbApr6TJ7ck71iLteR7XjwJc3wrNZqb mnH1swr/iiluIEvKJWuBEdg0tw1UAcrOMM9RWaRzBTDqJoANC1AV6iste9YydHfvKhJ7MoX8A guZilWhk6hlixf+L3KmkaOYkCX4liwMmvySvasLEzKq5BXKewDPUUGAI5+A5CujhdqZJGc0BI Z1jvDMKdotlGQL0CYweb366BKhspnKRKgN/UJE31Xi8Z9KTWpnohMuX062Q3+yXKlggy8ZhFs rhY+BuyvSqdbxWBymrcoiiKpRg12tXRSkaJjUjTnW3hui82RoKPUuby7R6a7bFvJ6iyYkIWlm 5bqeUFK1y5Ws7j6OkZ+4Nl8Sd/EwOYV8IhJZAk+2/p4koJKgPh3rK3cx/g6Meow3o4AKpj22x b8bl+x7ifWE2XqjTSXLo9wvTo7AUHsMTzB9MepdEt5FqsUZHXButRFpyGZBa6FXPWJ9UtZXb4 lcIF/VFHPk5tY= Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.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_H3=0.001, RCVD_IN_MSPIKE_WL=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:263837 Archived-At: There could be a minor mode that one can use with texinfo-mode=2E --------------------- Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy > 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 >