emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Tom Alexander <tom@fizz.buzz>
Cc: emacs-orgmode@gnu.org
Subject: Re: Incorrect quantity of en-spaces
Date: Wed, 18 Oct 2023 09:50:00 +0000	[thread overview]
Message-ID: <8734y8feev.fsf@localhost> (raw)
In-Reply-To: <e4303ee4-d74a-4411-9088-314ea01bcf00@app.fastmail.com>

"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	other threads:[~2023-10-18  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 18:05 Incorrect quantity of en-spaces Tom Alexander
2023-10-18  9:50 ` Ihor Radchenko [this message]
2023-10-18 15:37   ` Tom Alexander
2023-10-19  8:18     ` Ihor Radchenko

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=8734y8feev.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=tom@fizz.buzz \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).