GNU bug report logs - #78752
31.0.50; New tex-mode prettify-symbols-mode rule causes visual regression

Previous Next

Package: emacs;

Reported by: Tony Zorman <mail <at> tony-zorman.com>

Date: Tue, 10 Jun 2025 17:39:03 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Tony Zorman <mail <at> tony-zorman.com>
To: 78752 <at> debbugs.gnu.org
Subject: bug#78752: 31.0.50; New tex-mode prettify-symbols-mode rule causes visual regression
Date: Tue, 10 Jun 2025 18:39:37 +0200
Hi,

ever since ef6203b64aaf (Extend prettify-symbols-alist in TeX mode)
'tex--prettify-symbols-alist' contains the line

    ("\\ " . 9141) ; Literal ?⎵ breaks indentation

However, this is problematic and results in false positives for this
glyph, since it clashes with two literal backslashes -- which may be
used for line breaks -- followed by a space. For example,

    \begin{align*}
      f\colon A &\to B\\ a &\mapsto f(a) 
    \end{align*}

would display as

    \begin{align*}
      f: A &→ B\⎵a &↦ f(a) 
    \end{align*}

While I agree that a double backslash not followed by a newline is
confusing, some of my coauthors don't. This also affects other
environments that some people like to compress, like the ones for
matrices or TikZ pictures. I don't think getting this right is possible
without using regular expressions (which is AFAIU not how
'prettify-symbols-mode' works).

  Tony

-- 
Tony Zorman | https://tony-zorman.com




This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.