Browse Source

Merge branch 'maint'

Nicolas Goaziou 3 years ago
parent
commit
707fbc3778
2 changed files with 16 additions and 4 deletions
  1. 1 0
      lisp/org-element.el
  2. 15 4
      testing/lisp/test-org-element.el

+ 1 - 0
lisp/org-element.el

@@ -4150,6 +4150,7 @@ otherwise.  Modes can be either `first-section', `item',
   (if parentp
       (pcase type
 	(`headline 'section)
+	(`inlinetask 'planning)
 	(`plain-list 'item)
 	(`property-drawer 'node-property)
 	(`section 'planning)

+ 15 - 4
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