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:03:30 +0100 Message-ID: References: <87v9b8mvpb.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="6163"; 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:19:08 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 1l7VAh-0001UI-5n for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Feb 2021 04:19:07 +0100 Original-Received: from localhost ([::1]:53342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7VAg-00034X-7x for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Feb 2021 22:19:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Uvf-0005o1-ER for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:03:35 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:57169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Uvd-0002W2-If for emacs-devel@gnu.org; Wed, 03 Feb 2021 22:03:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612407810; bh=8VgRNZpXJhjSySadSwSFs16AtPG7OEsMzv6gu0OE57A=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=acEwbGtz37FT30mkqVhugPnbIpDUI4WiUyXWKL4rCJlyCo9bFTUbHn07PKltA9JPb 2SHpo+7hS/FFW6AkPpmYz6MJ7CgbNfU9+kspahT1O0KkxWUWxHSt+4MJNXQvQzvr0r hW+mUllIExe8c7epjIk0zWlYynpG20CcLH+FJWUE= 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:03:30 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87v9b8mvpb.fsf@telefonica.net> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:VwVt89jzVYdzz6KIfg6KpSWYRG4IZ7lm4Kq5KJUtVdn2tkI4GOv1dVpCobRvMaL24KUFR b+YOOi15UMmsOX0AXs9IY0I5euZdqC3pNJjG7dbrZAx8jM/EcIDHG5d33Slcidud/hFmIozrVQv1 lv+/xNBEIo8bdRPYpvNaW5xUTOIxb31z40OytWaVuzWhBkHx3wrknp/XD//xMo5T7RrDsw7zj+AB zvgdtojzeI8+HxxQXRXnay/viPF262vL/y6UUXo/3z+DUZmFsqOK4xGtfralL/l2HESmfRjaxqGl jA= X-UI-Out-Filterresults: notjunk:1;V03:K0:pYRtarU4MnE=:DA4UVT1BZUDdSOzO7+UiF5 XMhnlYhHz55CQaVhnjiizw2Xk1tA0sHtUf+8CkGJTTHopQY08XJB926y/IY4asPFHCevvWoya zQwaPBSy9kElWP7FA/2jcoqvfa/glEobr+736DHFtpGhTxvS3pI/7d+Z2uzbkP5/7eY7uNUT9 TtpGjM2PB0TISVZNhr3CHb4oYFS91K0VNJDJAOxusnfDGnYDhM9vNjlFXD22QMDyxWC/fzFtT unO3NrJ1FfQZjznQ0ninHv2Pv7vjrTasb2y6w6zG41YrF2EDv1xzg3B7R3PK3g1WZHz95fGkA RJ5EATS864h5gMD3JtlIctTOW7kRkHuYxztjNhA8cdqfx/Vvp1/+ZcIJvUwvjvxSGI/p4N7xN a/6yr24aT5edGvhkoAKZjRFKe6RJ4FH1ux1rexgK971Re4u8F6PsQnlncwyNbG/0b7LmqcqnC 3EC3qT4RxcvI4LskIGOnIeDvTwEV6pEtUMlZyw66AV50PWKEfeNNSy2mUpJ4tbEvzqyDSce0D 8PCdirblFkbW10QWNlW740A+jUMSSxMR+a8dM7zLBilTCSypyIYe1d0kCCJVtEscLne93/glb ThdON3i3C+p7Q= 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:263833 Archived-At: > Sent: Thursday, February 04, 2021 at 2:08 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 > > I am using prettify-symbols-mode for displaying greek command using > > the corresponding greek glyph when using mathematical expressions > > in texinfo=2E > > > > Here is an example > > > > (push '("\\alpha" =2E ?=CE=B1) prettify-symbols-alist) > > (push '("\\beta" =2E ?=CE=B2) prettify-symbols-alist) > > > > This works well when using "\alpha\beta", "\alpha - \beta"=20 > > But the expression fails when using "\alpha-\beta" or > > "\alpha_i", "\alpha_{ij}", "\beta^i", "\beta+\alpha"=2E > > The expressions are all valid mathematical expressions > > when using tex=2E =20 > > > > Would you be so kind to update "prettify-symbols-mode" > > so the substitutions can become possible to handle=2E > > > > Does this require that SYMBOL in (SYMBOL =2E CHARACTER) be > > a regexp? >=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 Emacs= : >=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 of > 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 be displayed using the usual tex expressions=2E Could this functionality be put for use in texinfo-mode? =20 >