Function: org-odt-export-to-odt
org-odt-export-to-odt is an autoloaded, interactive and byte-compiled
function defined in ox-odt.el.gz.
Signature
(org-odt-export-to-odt &optional ASYNC SUBTREEP VISIBLE-ONLY EXT-PLIST)
Documentation
Export current buffer to a ODT file.
If narrowing is active in the current buffer, only export its narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the org-export-stack interface.
When optional argument SUBTREEP is non-nil, export the sub-tree at point, extracting information from the headline properties first.
When optional argument VISIBLE-ONLY is non-nil, don't export contents of hidden elements.
EXT-PLIST, when provided, is a property list with external parameters overriding Org default settings, but still inferior to file-local settings.
Return output file's name.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
;;;; Export to OpenDocument Text
;;;###autoload
(defun org-odt-export-to-odt (&optional async subtreep visible-only ext-plist)
"Export current buffer to a ODT file.
If narrowing is active in the current buffer, only export its
narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the `org-export-stack' interface.
When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
Return output file's name."
(interactive)
(let ((outfile (org-export-output-file-name ".odt" subtreep)))
(if async
(org-export-async-start (lambda (f) (org-export-add-to-stack f 'odt))
`(expand-file-name
(org-odt--export-wrap
,outfile
(let* ((org-odt-embedded-images-count 0)
(org-odt-embedded-formulas-count 0)
(org-odt-automatic-styles nil)
(org-odt-object-counters nil)
;; Let `htmlfontify' know that we are interested in
;; collecting styles.
(hfy-user-sheet-assoc nil))
;; Initialize content.xml and kick-off the export
;; process.
(let ((out-buf
(progn
(require 'nxml-mode)
(let ((nxml-auto-insert-xml-declaration-flag nil))
(find-file-noselect
(concat org-odt-zip-dir "content.xml") t))))
(output (org-export-as
'odt ,subtreep ,visible-only nil ,ext-plist)))
(with-current-buffer out-buf
(erase-buffer)
(insert output)))))))
(org-odt--export-wrap
outfile
(let* ((org-odt-embedded-images-count 0)
(org-odt-embedded-formulas-count 0)
(org-odt-automatic-styles nil)
(org-odt-object-counters nil)
;; Let `htmlfontify' know that we are interested in collecting
;; styles.
(hfy-user-sheet-assoc nil))
;; Initialize content.xml and kick-off the export process.
(let ((output (org-export-as 'odt subtreep visible-only nil ext-plist))
(out-buf (progn
(require 'nxml-mode)
(let ((nxml-auto-insert-xml-declaration-flag nil))
(find-file-noselect
(concat org-odt-zip-dir "content.xml") t)))))
(with-current-buffer out-buf (erase-buffer) (insert output))))))))