Function: org-odt-src-block

org-odt-src-block is a byte-compiled function defined in ox-odt.el.gz.

Signature

(org-odt-src-block SRC-BLOCK CONTENTS INFO)

Documentation

Transcode a SRC-BLOCK element from Org to ODT.

CONTENTS holds the contents of the item. INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
(defun org-odt-src-block (src-block _contents info)
  "Transcode a SRC-BLOCK element from Org to ODT.
CONTENTS holds the contents of the item.  INFO is a plist holding
contextual information."
  (let* ((attributes (org-export-read-attribute :attr_odt src-block))
	 (caption (car (org-odt-format-label src-block info 'definition))))
    (concat
     (and caption
	  (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
		  "Listing" caption))
     (let ((--src-block (org-odt-format-code src-block info)))
       (if (not (plist-get attributes :textbox)) --src-block
	 (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
		 "Text_20_body"
		 (org-odt--textbox --src-block nil nil nil)))))))