Function: org-odt-item

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

Signature

(org-odt-item ITEM CONTENTS INFO)

Documentation

Transcode an ITEM 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
;;;; Item

(defun org-odt-item (item contents info)
  "Transcode an ITEM element from Org to ODT.
CONTENTS holds the contents of the item.  INFO is a plist holding
contextual information."
  (let* ((plain-list (org-element-parent item))
	 (count (org-element-property :counter item))
	 (type (org-element-property :type plain-list)))
    (unless (memq type '(ordered unordered descriptive-1 descriptive-2))
      (error "Unknown list type: %S" type))
    (format "\n<text:list-item%s>\n%s\n%s"
	    (if count (format " text:start-value=\"%s\"" count) "")
	    contents
	    (if (org-element-map item
                    'table #'identity info 'first-match
                    ;; Ignore tables inside sub-lists.
                    '(plain-list))
                ;; `org-odt-table' will splice forced list ending (all
                ;; the way up to the topmost list parent), table, and
                ;; forced list re-opening in the middle of the item,
                ;; marking text after table with <text:list-header>
                ;; So, we must match close </text:list-header> instead
                ;; of the original </text:list-item>.
		"</text:list-header>"
	      "</text:list-item>"))))