org-element: Recognize planning info only right after a headline
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 31 Aug 2014 13:39:35 +0000 (15:39 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 31 Aug 2014 13:39:35 +0000 (15:39 +0200)
commit539eac92111aa9f920fde3015dbd9598e20b3e5c
tree0534a7269a3ecc84cdf7874dbda371008a6972f2
parentbbdca56e916f9f51f7b0bde169db8599669846d7
org-element: Recognize planning info only right after a headline

* lisp/org.el (org-planning-line-re): New variable.  Renamed from
  `org-planning-or-clock-line-re'.

* lisp/org-element.el (org-element-paragraph-separate,
  org-element-headline-parser, org-element-inlinetask-parser, ,
  org-element--current-element): Use new variable.
(org-element-planning-parser): Check previous line before parsing
planning info.  When right after a headline, fallback to paragraph
parsing.

* testing/lisp/test-org-element.el (test-org-element/planning-parser):
  Add a test.  Update others.
(test-org-element/timestamp): Remove a test.
* testing/lisp/test-ox.el (test-org-export/handle-options): Update
  test.
lisp/org-element.el
lisp/org.el
testing/lisp/test-org-element.el
testing/lisp/test-ox.el