summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2011-09-05 11:33:20 +0530
committerJambunathan K <kjambunathan@gmail.com>2011-09-05 12:03:55 +0530
commit82cf5d59e7ee391101ff696bf27b7cfa2b1dcae2 (patch)
tree286ee8d2aa3fad00c2ba85dc1b17696c3ecc6438
parentc08183d0434aae24f6f4627c221778402718d2ac (diff)
downloadorg-mode-82cf5d59e7ee391101ff696bf27b7cfa2b1dcae2.tar.gz
org-odt.el: Create mimetype file towards the end of export
* contrib/lisp/org-odt.el (org-odt-init-outfile): Don't create mimetype file here. (org-odt-save-as-outfile): Create mimetype file here. Note that this routine gets called towards the end of the export just before files are zipped.
-rw-r--r--contrib/lisp/org-odt.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index 8fc2481..3dfc018 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1422,10 +1422,6 @@ MAY-INLINE-P allows inlining it as an image."
(save-excursion
(insert (mapconcat 'identity (cdr org-export-odt-manifest-lines) "\n"))))
- ;; mimetype
- (with-current-buffer (find-file-noselect mimetype-file t)
- (insert "application/vnd.oasis.opendocument.text"))
-
;; styles file
;; (copy-file org-export-odt-styles-file styles-file t)
@@ -1451,6 +1447,10 @@ visually."
(defvar hfy-user-sheet-assoc) ; bound during org-do-lparse
(defun org-odt-save-as-outfile (target opt-plist)
+ ;; create mimetype file
+ (write-region "application/vnd.oasis.opendocument.text" nil
+ (expand-file-name "mimetype"))
+
;; write meta file
(org-odt-update-meta-file opt-plist)