Browse Source

org-element: Fix `org-element-at-point'

* lisp/org-element.el (org-element-at-point): Fix function when buffer
  starts with a headline.
Nicolas Goaziou 11 years ago
parent
commit
ae1cf04833
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-element.el

+ 1 - 1
lisp/org-element.el

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