Function: org-odt-format-headline--wrap

org-odt-format-headline--wrap is a byte-compiled function defined in ox-odt.el.gz.

Signature

(org-odt-format-headline--wrap HEADLINE BACKEND INFO &optional FORMAT-FUNCTION &rest EXTRA-KEYS)

Documentation

Transcode a HEADLINE element using BACKEND.

INFO is a plist holding contextual information.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Headline

(defun org-odt-format-headline--wrap (headline backend info
					       &optional format-function
					       &rest extra-keys)
  "Transcode a HEADLINE element using BACKEND.
INFO is a plist holding contextual information."
  (setq backend (or backend (plist-get info :back-end)))
  (let* ((level (+ (org-export-get-relative-level headline info)))
	 (headline-number (org-export-get-headline-number headline info))
	 (section-number (and (org-export-numbered-headline-p headline info)
			      (mapconcat 'number-to-string
					 headline-number ".")))
	 (todo (and (plist-get info :with-todo-keywords)
		    (let ((todo (org-element-property :todo-keyword headline)))
		      (and todo
			   (org-export-data-with-backend todo backend info)))))
	 (todo-type (and todo (org-element-property :todo-type headline)))
	 (priority (and (plist-get info :with-priority)
			(org-element-property :priority headline)))
	 (text (org-export-data-with-backend
		(org-element-property :title headline) backend info))
	 (tags (and (plist-get info :with-tags)
		    (org-export-get-tags headline info)))
	 (headline-label (org-export-get-reference headline info))
	 (format-function
	  (if (functionp format-function) format-function
	    (cl-function
	     (lambda (todo todo-type priority text tags
                           &key _level _section-number _headline-label
                           &allow-other-keys)
	       (funcall (plist-get info :odt-format-headline-function)
			todo todo-type priority text tags))))))
    (apply format-function
	   todo todo-type priority text tags
	   :headline-label headline-label
	   :level level
	   :section-number section-number extra-keys)))