emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Where does headline data end for the purpose of `org-adapt-indentati


From: Ihor Radchenko
Subject: Re: Where does headline data end for the purpose of `org-adapt-indentation´ == ´headline-data
Date: Sun, 11 Jun 2023 10:21:35 +0000

Jens Schmidt <jschmidt4gnu@vodafonemail.de> writes:

> (setq org-adapt-indentation 'headline-data)
>
> Paste the following into a new org file, headline A being the on the
> first line:
>
> -------------------- snip --------------------
> ** Headline A
>
>
>
> ** Headline B
>
>
>
> ** Headline C
>     :properties:
> -------------------- snip --------------------
>
> Then try TAB on lines (my humble opinion in parentheses)
>
> 2: no indent (NOK)

This is right:

`org-adapt-indentation' docstring states

    When this variable is set to headline-data, Org only adapts the
    indentation of the data lines right below the headline, such as
    planning/clock lines and property/logbook drawers.

Blank line is not a planning/clock/line/property drawer/logbook.
So, we do not indent.

> 6: indent (OK)
> 7: indent (NOK)

This is a bug. Fixed now, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=34082ff18

The logic in `org-indent-line' did not account for blank lines after heading.

> 11: no indent (NOK)

This is also OK. ":properties:", from Org's point of view is not a
property drawer, but a paragraph (there is no closing :end: and property
values inside). So, it is not a headline data.

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