org-element: Fix infloop when an heading is the first line of a buffer
* contrib/lisp/org-element.el (org-element-section-parser): Fix infloop when an heading is the first line of a buffer.
This commit is contained in:
parent
bb39f7ea20
commit
27f3a7cb05
|
@ -736,7 +736,7 @@ and `:post-blank' keywords."
|
||||||
;; line after previous headline.
|
;; line after previous headline.
|
||||||
(let ((begin (save-excursion
|
(let ((begin (save-excursion
|
||||||
(org-with-limited-levels (outline-previous-heading))
|
(org-with-limited-levels (outline-previous-heading))
|
||||||
(if (bobp) (point)
|
(if (not (org-at-heading-p)) (point)
|
||||||
(forward-line) (org-skip-whitespace) (point-at-bol))))
|
(forward-line) (org-skip-whitespace) (point-at-bol))))
|
||||||
(end (progn (org-with-limited-levels (outline-next-heading))
|
(end (progn (org-with-limited-levels (outline-next-heading))
|
||||||
(point)))
|
(point)))
|
||||||
|
|
Loading…
Reference in New Issue