all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
Date: Thu, 4 Feb 2021 04:46:09 +0100	[thread overview]
Message-ID: <trinity-a49986d6-a04e-4815-938d-8a39e7f2385e-1612410368976@3c-app-mailcom-bs11> (raw)
In-Reply-To: <87r1lwmrgc.fsf@telefonica.net>

There could be a minor mode that one can use with texinfo-mode.

---------------------
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: "Óscar Fuentes" <ofv@wanadoo.es>
> To: emacs-devel@gnu.org
> Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
>
> pietru@caramail.com writes:
> 
> >> The docstring of prettify-symbols-alist says:
> >> 
> >>   Each element looks like (SYMBOL . CHARACTER), where the symbol
> >>   matching SYMBOL (a string, not a regexp) will be shown as CHARACTER
> >>   instead.
> >> 
> >> so no, SYMBOL *must* *not* be a regexp.
> >> 
> >> I can't reproduce the problem you are describing. After starting Emacs:
> >> 
> >> emacs -Q
> >> 
> >> if I evaluate this in *scratch*:
> >> 
> >>   (push '("\\alpha" . ?α) prettify-symbols-alist)
> >> 
> >> then open a .tex file, write \alpha_i, M-x prettify-symbols-alist, the
> >> string is transformed to α_i.
> >> 
> >> 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.
> >> 
> >
> > No, the major mode is texinfo-mode.  Texinfo allows mathematics to be
> > displayed using the usual tex expressions.  Could this functionality
> > be put for use in texinfo-mode?
> 
> I missed the texinfo bit on your original message, sorry.
> 
> 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.
> 
> Probably the easiest route for you is to derive a mode from texinfo-mode
> that modifies the syntax table defined in texinfo.el to suit your needs
> (see "Syntax Tables" in the Elisp manual).
> 
> 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.
> 
> 
>



  reply	other threads:[~2021-02-04  3:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  1:24 prettify-symbols-mode to handle "\alpha-\beta" pietru
2021-02-04  2:08 ` Óscar Fuentes
2021-02-04  3:03   ` pietru
2021-02-04  3:39     ` Óscar Fuentes
2021-02-04  3:46       ` Christopher Dimech [this message]
2021-02-04  3:51       ` pietru
2021-02-04  4:04       ` Stefan Monnier
2021-02-04  4:21         ` Christopher Dimech
2021-02-04 16:12           ` Stefan Monnier
2021-02-04 18:09             ` Christopher Dimech
2021-02-04 18:21               ` Stefan Monnier
2021-02-04 20:14                 ` Christopher Dimech
2021-02-04 18:15             ` Christopher Dimech
2021-02-04 18:23               ` Stefan Monnier
2021-02-04 20:22                 ` Christopher Dimech
2021-02-04 20:38                   ` Stefan Monnier
2021-02-04 20:54                     ` Christopher Dimech
2021-02-05 20:32                     ` pietru
2021-02-05 21:01                       ` Stefan Monnier
2021-02-05 21:05                         ` Christopher Dimech
2021-02-05 21:54                           ` Christopher Dimech
2021-02-05 21:57                           ` Stefan Monnier
2021-02-05 22:09                       ` Gregory Heytings
2021-02-05 22:22                         ` pietru
2021-02-05 22:45                           ` Gregory Heytings
2021-02-05 22:56                             ` pietru
2021-02-05 23:04                               ` Gregory Heytings
2021-02-05 23:15                                 ` pietru
2021-02-05 23:22                                   ` Gregory Heytings
2021-02-05 23:43                                     ` Christopher Dimech
2021-02-05 23:44                                     ` pietru
2021-02-06  0:05                                     ` pietru
2021-02-04 20:34                 ` Christopher Dimech
2021-02-04  3:46 ` Ihor Radchenko
2021-02-04  3:59   ` Christopher Dimech
2021-02-04  8:44 ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-a49986d6-a04e-4815-938d-8a39e7f2385e-1612410368976@3c-app-mailcom-bs11 \
    --to=dimech@gmx.com \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.