;;; org-odt.el --- OpenDocument Text exporter for Org-mode
-;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2013 Free Software Foundation, Inc.
;; Author: Jambunathan K <kjambunathan at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp
"meta.xml" "styles.xml")))
;; kill all xml buffers
(mapc (lambda (file)
- (let ((buf (find-file-noselect
- (expand-file-name file org-odt-zip-dir) t)))
- (when (buffer-name buf)
- (set-buffer-modified-p nil)
- (kill-buffer buf))))
+ (with-current-buffer
+ (find-file-noselect
+ (expand-file-name file org-odt-zip-dir) t)
+ (set-buffer-modified-p nil)
+ (kill-buffer)))
xml-files))
;; delete temporary directory.
- (delete-directory org-odt-zip-dir t)))))
- (org-condition-case-unless-debug err
+ (org-delete-directory org-odt-zip-dir t)))))
+ (condition-case err
(prog1 (progn ,@body)
(funcall --cleanup-xml-buffers))
((quit error)
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-odt-batch"
- (org-lparse-batch "odt"))
+ (org-odt-cleanup-xml-buffers (org-lparse-batch "odt")))
;;; org-export-as-odt
;;;###autoload
((and (string= type "")
(or (not thefile) (string= thefile ""))
(plist-get org-lparse-opt-plist :section-numbers)
+ (get-text-property 0 'org-no-description fragment)
(setq sec-frag fragment)
(or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag)
(and (setq sec-frag
(when (not (member type '("" "file")))
(setq thefile (concat type ":" thefile)))
- (let ((org-odt-suppress-xref nil))
+ (let ((org-odt-suppress-xref
+ ;; Typeset link to headlines with description, as a
+ ;; regular hyperlink.
+ (and (string= type "")
+ (not (get-text-property 0 'org-no-description fragment)))))
(org-odt-format-link
(org-xml-format-desc desc) thefile attr)))))))
(defun org-export-odt-preprocess (parameters)
(org-export-odt-preprocess-label-references))
-(declare-function archive-zip-extract "arc-mode.el" (archive name))
+(declare-function archive-zip-extract "arc-mode" (archive name))
(defun org-odt-zip-extract-one (archive member &optional target)
(require 'arc-mode)
(let* ((target (or target default-directory))
(provide 'org-odt)
+;; Local variables:
+;; generated-autoload-file: "org-loaddefs.el"
+;; End:
+
;;; org-odt.el ends here