[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: |
Thu, 08 Jun 2023 11:17:38 +0000 |
Farblos <akfkqu.9df7rp@vodafonemail.de> writes:
> I like the idea of org-adapt-indentation being ´headline-data:
>
> 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.
>
> However, I find the resulting indentation behavior confusing. Before
> reporting bugs, I'd like to know where the headline data ends. I'd
> expect that the first blank (or whitespace-only?) line after a headline
> would end the headline data.
(defun org--at-headline-data-p (&optional beg element)
"Return non-nil when `point' or BEG is inside headline metadata.
Metadata is planning line, properties drawer, logbook drawer right
after property drawer, or clock log line immediately following
properties drawer/planning line/ heading.
Hope it clarifies things.
Note that we had some bugs in this area in older Org versions.
--
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>