emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: "Léo Ackermann" <leo.komba@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Ox unindents lines but I can't see when
Date: Sat, 01 Oct 2022 16:01:16 +0800	[thread overview]
Message-ID: <877d1kt1kj.fsf@localhost> (raw)
In-Reply-To: <CAFhsWEhgMsp4tifuH0yqd3gRRBaG+fmfgctR3XMkMey17DOjEg@mail.gmail.com>

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	other threads:[~2022-10-01  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 10:40 Ox unindents lines but I can't see when Léo Ackermann
2022-10-01  5:32 ` Ihor Radchenko
2022-10-01  7:48   ` Léo Ackermann
2022-10-01  8:01     ` Ihor Radchenko [this message]

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=877d1kt1kj.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=leo.komba@gmail.com \
    /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).