Function: org-odt-keyword

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

Signature

(org-odt-keyword KEYWORD CONTENTS INFO)

Documentation

Transcode a KEYWORD element from Org to ODT.

CONTENTS is nil. INFO is a plist holding contextual information.

Source Code

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

(defun org-odt-keyword (keyword _contents info)
  "Transcode a KEYWORD element from Org to ODT.
CONTENTS is nil.  INFO is a plist holding contextual
information."
  (let ((key (org-element-property :key keyword))
	(value (org-element-property :value keyword)))
    (cond
     ((string= key "ODT") value)
     ((string= key "INDEX")
      ;; FIXME
      (ignore))
     ((string= key "TOC")
      (let ((case-fold-search t))
	(cond
	 ((string-match-p "\\<headlines\\>" value)
	  (let ((depth (or (and (string-match "\\<[0-9]+\\>" value)
				(string-to-number (match-string 0 value)))
			   (plist-get info :headline-levels)))
		(scope
		 (cond
		  ((string-match ":target +\\(\".+?\"\\|\\S-+\\)" value) ;link
		   (org-export-resolve-link
		    (org-strip-quotes (match-string 1 value)) info))
		  ((string-match-p "\\<local\\>" value) keyword)))) ;local
	    (org-odt-toc depth info scope)))
	 ((string-match-p "tables\\|figures\\|listings" value)
	  ;; FIXME
	  (ignore))))))))