org-element: Correctly get section beginning

* contrib/lisp/org-element.el (org-element-section-parser): Fix
  `:begin' property, which was preventing correct parsing of text
  before first headline.
This commit is contained in:
Nicolas Goaziou 2012-01-08 19:33:50 +01:00
parent 59df6a9ba0
commit e09f92bf7e
1 changed files with 2 additions and 3 deletions

View File

@ -736,9 +736,8 @@ and `:post-blank' keywords."
;; line after previous headline.
(let ((begin (save-excursion
(org-with-limited-levels (outline-previous-heading))
(forward-line)
(org-skip-whitespace)
(point-at-bol)))
(if (bobp) (point)
(forward-line) (org-skip-whitespace) (point-at-bol))))
(end (progn (org-with-limited-levels (outline-next-heading))
(point)))
(pos-before-blank (progn (skip-chars-backward " \r\t\n")