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>
This commit is contained in:
parent
0ee8ba3e0d
commit
9de1ee1b6f
|
@ -4183,6 +4183,7 @@ otherwise. Modes can be either `first-section', `item',
|
||||||
(if parentp
|
(if parentp
|
||||||
(case type
|
(case type
|
||||||
(headline 'section)
|
(headline 'section)
|
||||||
|
(inlinetask 'planning)
|
||||||
(plain-list 'item)
|
(plain-list 'item)
|
||||||
(property-drawer 'node-property)
|
(property-drawer 'node-property)
|
||||||
(section 'planning)
|
(section 'planning)
|
||||||
|
|
|
@ -1221,17 +1221,28 @@ Contents
|
||||||
;; Planning info.
|
;; Planning info.
|
||||||
(should
|
(should
|
||||||
(org-test-with-temp-text "
|
(org-test-with-temp-text "
|
||||||
*************** Task
|
*************** Task<point>
|
||||||
DEADLINE: <2012-03-29 thu.>
|
DEADLINE: <2012-03-29 thu.>
|
||||||
*************** END"
|
*************** END"
|
||||||
(forward-line)
|
|
||||||
(org-element-property :deadline (org-element-at-point))))
|
(org-element-property :deadline (org-element-at-point))))
|
||||||
(should-not
|
(should
|
||||||
|
(eq 'planning
|
||||||
(org-test-with-temp-text "
|
(org-test-with-temp-text "
|
||||||
*************** Task
|
*************** Task
|
||||||
|
<point>DEADLINE: <2012-03-29 thu.>
|
||||||
|
*************** END"
|
||||||
|
(org-element-type (org-element-at-point)))))
|
||||||
|
(should-not
|
||||||
|
(org-test-with-temp-text "
|
||||||
|
*************** Task<point>
|
||||||
DEADLINE: <2012-03-29 thu.>"
|
DEADLINE: <2012-03-29 thu.>"
|
||||||
(forward-line)
|
|
||||||
(org-element-property :deadline (org-element-at-point))))
|
(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.
|
;; Priority.
|
||||||
(should
|
(should
|
||||||
(eq
|
(eq
|
||||||
|
|
Loading…
Reference in New Issue