org-element: Add missing inline-src-block interpreter

* contrib/lisp/org-element.el
  (org-element-inline-src-block-interpreter): New function.
This commit is contained in:
Nicolas Goaziou 2012-01-11 15:30:27 +01:00
parent 096ffd571c
commit 3fc0afb5ee
1 changed files with 11 additions and 0 deletions

View File

@ -1808,6 +1808,17 @@ Assume point is at the beginning of the inline src block."
:end ,end
:post-blank ,post-blank)))))
(defun org-element-inline-src-block-interpreter (inline-src-block contents)
"Interpret INLINE-SRC-BLOCK object as Org syntax.
CONTENTS is nil."
(let ((language (org-element-get-property :language inline-src-block))
(arguments (org-element-get-property :parameters inline-src-block))
(body (org-element-get-property :value inline-src-block)))
(format "src_%s%s{%s}"
language
(if arguments (format "[%s]" arguments) "")
body)))
(defun org-element-inline-src-block-successor (limit)
"Search for the next inline-babel-call and return beginning position.