emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Incorrect quantity of en-spaces


From: Ihor Radchenko
Subject: Re: Incorrect quantity of en-spaces
Date: Wed, 18 Oct 2023 09:50:00 +0000

"Tom Alexander" <tom@fizz.buzz> writes:

> 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.

This appears to be a special case, not documented on org-syntax page.

When users want to add non-standard space\_     , it should not be
treated as\_    {} - with extra space after the entity. Otherwise, users
might get unexpected results during export, with additional normal space
after user-defined.

Does it make sense to you?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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