From 3fc0afb5eebb28cb6f4b2ba28eedb99264d32ead Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 11 Jan 2012 15:30:27 +0100 Subject: [PATCH] org-element: Add missing inline-src-block interpreter * contrib/lisp/org-element.el (org-element-inline-src-block-interpreter): New function. --- contrib/lisp/org-element.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/lisp/org-element.el b/contrib/lisp/org-element.el index 184ff998c..1a1011ecf 100644 --- a/contrib/lisp/org-element.el +++ b/contrib/lisp/org-element.el @@ -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.