mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-27 18:02:51 +00:00
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.
|
||||
(let ((begin (save-excursion
|
||||
(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))))
|
||||
(end (progn (org-with-limited-levels (outline-next-heading))
|
||||
(point)))
|
||||
|
|
Loading…
Reference in a new issue