Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
org-indent-region: Fix when `org-adapt-indentation' is 'headline-data
* lisp/org.el (org--get-expected-indentation): Remove the extra condition added in e3b79ad in the cond branch for first line in an element. Checking `org-adapt-indentation' t value here trigger the last default cond branch that assumes that we are _not_ at the first line. The new logic explicitly avoids inheriting indentation from previous sibling when `org-adapt-indentation' is set to 'headline-data and the previous sibling is satisfying "headline data" condition as in `org-indent-line'. The case when `org-adapt-indentation' is set to t is already handled correctly when calculating the CONTENTSP indentation for parent headline. Fixes https://orgmode.org/list/c13cab60-bbc9-e69e-6d0d-7fe75c5908d6@kalysto.org
- Loading branch information