Browse Source

org-export: Add function to retrieve next element/object in parse tree

* contrib/lisp/org-export.el (org-export-get-next-element): New function.
Nicolas Goaziou 8 years ago
parent
commit
a47713717b
1 changed files with 10 additions and 0 deletions
  1. 10 0
      contrib/lisp/org-export.el

+ 10 - 0
contrib/lisp/org-export.el

@@ -2863,6 +2863,16 @@ Return previous element or object, a string, or nil."
   (let ((parent (car (plist-get info :genealogy))))
     (cadr (member blob (reverse (org-element-get-contents parent))))))
 
+(defun org-export-get-next-element (blob info)
+  "Return next element or object.
+
+BLOB is an element or object.  INFO is a plist used as
+a communication channel.
+
+Return next element or object, a string, or nil."
+  (let ((parent (car (plist-get info :genealogy))))
+    (cadr (member blob (org-element-get-contents parent)))))
+
 
 
 ;;; The Dispatcher