emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Incorrect quantity of en-spaces


From: Tom Alexander
Subject: Incorrect quantity of en-spaces
Date: Mon, 16 Oct 2023 14:05:10 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85

The org-mode syntax document describes entities as:
> \NAME POST
> \NAME{}
> Where NAME and POST are not separated by a whitespace character.

and POST is defined as:
> Either the end of line or a non-alphabetic character.

So using the test document:
```
\_   Foo
```
(a backslash, underscore, three spaces, and then the word Foo)

I would expect to get only 2 en-spaces but I am getting 3. Looking at 
org-entities, an underscore with 2 spaces gets 2 en-spaces, whereas an 
underscore with 3 spaces gets 3 en-spaces, but if we match all 3 spaces as NAME 
then POST becomes invalid because "F" is neither the end of the line nor a 
non-alphabetic character, so we can only match the first two spaces as NAME.

emacs version: 29.1
org-mode version: 9bbc21df84d507e568a3ebd17e105cdb9e163784 (latest in git)

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]