emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Ox unindents lines but I can't see when


From: Ihor Radchenko
Subject: Re: Ox unindents lines but I can't see when
Date: Sat, 01 Oct 2022 16:01:16 +0800

Léo Ackermann <leo.komba@gmail.com> writes:

> I can not reproduce this (ie. my second paragraph is unindented). Here
> comes my bug.org/org.txt files I have using ASCII export.
> I run Emacs 28.2, I just updated the packages.
> I think this is not of importance here, but I use Doom Emacs (up-to-date
> also).
>
> I confirm that my goal is to have the indentation of the second paragraph
> preserved.

Ok. I see what is happening.
The file you provided here is importantly different from the text you
had in text part of your email.

The text I tried had multiple lines with the smallest common indentation =
0. The text you attached consists of a single line with a non-zero
common indentation (indentation = the single line indentation).

As a basic principle of Org markup, Org ignores common indentation of
paragraphs and other syntax elements inside section. Thus, your
paragraph indentation gets removed. It is done in
`org-element-normalize-contents'.

If you want to force Org to ignore the one-line paragraph indentation,
you can put an escape character [zero-width space] (see
https://orgmode.org/manual/Escape-Character.html#Escape-Character) at
the beginning of the line. Alternatively, you can put a non-exportable
object like @@nil:@@.

Hope it helps.

-- 
Ihor Radchenko,
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]