org-element: Fix `org-element-at-point'
* lisp/org-element.el (org-element-at-point): Fix function when buffer starts with a headline.
This commit is contained in:
parent
4dbbbe5b01
commit
ae1cf04833
|
@ -5270,7 +5270,7 @@ first row."
|
|||
;; section in current headline, if any, or to first non-empty
|
||||
;; line in buffer otherwise.
|
||||
(org-with-limited-levels (outline-previous-heading))
|
||||
(unless (bobp) (forward-line))
|
||||
(when (org-at-heading-p) (forward-line))
|
||||
(skip-chars-forward " \r\t\n")
|
||||
(beginning-of-line))
|
||||
;; Now we are at the beginning of an element, start parsing.
|
||||
|
|
Loading…
Reference in New Issue