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:
Nicolas Goaziou 2013-12-30 17:26:13 +01:00
parent 4dbbbe5b01
commit ae1cf04833
1 changed files with 1 additions and 1 deletions

View File

@ -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.