diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-16 23:19:06 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-10-16 23:19:06 +0200 |
commit | 9de1ee1b6fa5099f344c973881597012a06a9138 (patch) | |
tree | c3eddb1a3da8785d856b2ce7832810db3c8d8838 | |
parent | 0ee8ba3e0daa1214fb6d7349b8ee5db8f75a524e (diff) | |
download | org-mode-9de1ee1b6fa5099f344c973881597012a06a9138.tar.gz |
org-element: Fix parsing of planning in inline tasks
* lisp/org-element.el (org-element--next-mode): Line following an
inlinetask can be a planning.
* testing/lisp/test-org-element.el (test-org-element/inlinetask-parser):
Update test.
Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/101958>
-rw-r--r-- | lisp/org-element.el | 1 | ||||
-rw-r--r-- | testing/lisp/test-org-element.el | 19 |
2 files changed, 16 insertions, 4 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el index 1fbedd1..911e4e1 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4183,6 +4183,7 @@ otherwise. Modes can be either `first-section', `item', (if parentp (case type (headline 'section) + (inlinetask 'planning) (plain-list 'item) (property-drawer 'node-property) (section 'planning) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 621702b..560d9cf 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1221,17 +1221,28 @@ Contents ;; Planning info. (should (org-test-with-temp-text " -*************** Task +*************** Task<point> DEADLINE: <2012-03-29 thu.> *************** END" - (forward-line) (org-element-property :deadline (org-element-at-point)))) + (should + (eq 'planning + (org-test-with-temp-text " +*************** Task +<point>DEADLINE: <2012-03-29 thu.> +*************** END" + (org-element-type (org-element-at-point))))) (should-not (org-test-with-temp-text " -*************** Task +*************** Task<point> DEADLINE: <2012-03-29 thu.>" - (forward-line) (org-element-property :deadline (org-element-at-point)))) + (should-not + (eq 'planning + (org-test-with-temp-text " +*************** Task +<point>DEADLINE: <2012-03-29 thu.>" + (org-element-type (org-element-at-point))))) ;; Priority. (should (eq |