Skip to content

In org-mode, the prettify/fontify of subscripts is not properly handled and jumps back to normal script after one letter #8723

@lschmalen

Description

@lschmalen

Describe your issue

When I open a buffer in org-mode and I type some text, subscripts are displayed typically in the buffer as subscript text. So, when I type "x_{", doom emacs automatically inserts a closing brace "}" and the cursor jumps into subscript mode. Now, I expect to be able to type as long as I type a closing brace, however, after typing a single letter, the text now jumps back to normal (not subscript) font. It seems that only the first letter is in the braces and the remaining letters are not. For instance if I type the sequence (adding spaces to highlght the different keystrokes "x _ { a b c" and I then turn off prettification using "C-c C-x ", I see "x_{a}bc" instead of the expected x_{abc}. However, the prettification is turned off from the start, they keystrokes "x _ {a b c" lead to "x_{abc}". This is quite annoying behavior and has led me to turn off prettification in org-mode using
(setq org-pretty-entities-include-sub-superscripts nil) in my configuration. It would be great if this could be fixed

Steps to reproduce

Open org buffer, type "x_{abc" without "". Make sure prettification is on (I use a more or less out-of-the-box org mode

System information

https://pastebin.com/h85QHpZp

Disclosures

  • This issue was written with/by AI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugSomething isn't working as intendedneeds-triageIssue hasn't been assessed yet

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions