org--at-headline-data-p: Fix when at :post-blank after heading
* lisp/org.el (org--at-headline-data-p): Fix infinite loop when within blank lines after empty heading. Reported-by: David Lukeš <dafydd.lukes@gmail.com> Link: https://orgmode.org/list/CAEPTPEw9hugOWmzhNWCzCeXzV_qNePAdz4BbOp_sanTH9ZJ+AA@mail.gmail.com
This commit is contained in:
parent
0de063a521
commit
8a827437a5
|
@ -18657,7 +18657,8 @@ Optional argument ELEMENT contains element at BEG."
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
(when beg (goto-char beg))
|
(when beg (goto-char beg))
|
||||||
(setq element (or element (org-element-at-point)))
|
(setq element (or element (org-element-at-point)))
|
||||||
(if (not (org-element-lineage element '(headline inlinetask)))
|
(if (or (eq (org-element-type element) 'headline)
|
||||||
|
(not (org-element-lineage element '(headline inlinetask))))
|
||||||
nil ; Not inside heading.
|
nil ; Not inside heading.
|
||||||
;; Skip to top-level parent in section.
|
;; Skip to top-level parent in section.
|
||||||
(while (not (eq 'section (org-element-type (org-element-property :parent element))))
|
(while (not (eq 'section (org-element-type (org-element-property :parent element))))
|
||||||
|
|
Loading…
Reference in New Issue