emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Wiskey 5 Alpha <wiskey5alpha@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Publishing org project as odt
Date: Sat, 22 Dec 2012 11:01:06 -0500	[thread overview]
Message-ID: <50D5D942.6050700@gmail.com> (raw)
In-Reply-To: <87txredz7h.fsf@gmail.com>

Thank you for your reply.  Below you will find a small example to 
illustrate the problem.  First I have a small test org-mode file in the 
directory, =test.org=.  It's contents is shown next.  I run the batch 
process, which causes an error.   All files in the directory are deleted 
except for the .odt file !

Thanks again.  I am running emacs version 23.4.1 on Ubuntu 12.10, and 
org-mode from elpa package =org-plus-contrib 20121217=

-Tim


aldrichtr@liberty:/tmp/export-process
$ ls
test.org
aldrichtr@liberty:/tmp/export-process
$ cat test.org

* This is heading one
   And some text
** heading one two
    And some text

aldrichtr@liberty:/tmp/export-process
$ emacs --batch --load=$HOME/.emacs --visit=./test.org --funcall 
org-export-as-odt-batch
...
Debug (org-odt): Searching for OpenDocument schema files...
Debug (org-odt): Trying /usr/share/emacs/etc/org/schema/...
Debug (org-odt): Trying /usr/share/emacs/etc/org/schema/...
Debug (org-odt): No OpenDocument schema files installed
Debug (org-odt): Searching for OpenDocument styles files...
Debug (org-odt): Trying /usr/share/emacs/etc/org/styles/...
Debug (org-odt): Trying /usr/share/emacs/etc/org/styles/...
Debug (org-odt): Trying /home/aldrichtr/.emacs.d/elpa/etc/styles/...
Debug (org-odt): Trying 
/home/aldrichtr/.emacs.d/elpa/org-plus-contrib-20121217/etc/styles/...
Debug (org-odt): Using styles under 
/home/aldrichtr/.emacs.d/elpa/org-plus-contrib-20121217/etc/styles/
Exporting to ODT using org-lparse...
Using vacuous schema
[yas] Loading for `nxml-mode', just-in-time: (yas--load-directory-1 
/home/aldrichtr/.emacs.d/elpa/yasnippet-20121127.25/snippets/nxml-mode 
(quote nxml-mode) (quote (text-mode)))!
[yas] Loading compiled snippets from 
/home/aldrichtr/.emacs.d/elpa/yasnippet-20121127.25/snippets/nxml-mode
LaTeX to MathML converter not available. Using verbatim instead.
Exporting...
ODT export done, pushed to kill ring and clipboard
Wrote /tmp/export-process/meta.xml
Using vacuous schema
Saving file /tmp/export-process/styles.xml...
Wrote /tmp/export-process/styles.xml
Wrote /tmp/export-process/mimetype
Using vacuous schema
Saving file /tmp/export-process/styles.xml...
Wrote /tmp/export-process/styles.xml
(No changes need to be saved)
Saving file /tmp/export-process/META-INF/manifest.xml...
Wrote /tmp/export-process/META-INF/manifest.xml
Saving file /tmp/export-process/content.xml...
Wrote /tmp/export-process/content.xml
Using vacuous schema
(No changes need to be saved)
Creating odt file...
Running zip -mX0 test.odt mimetype
Running zip -rmTq test.odt .
Debugger entered--Lisp error: (file-already-exists "File already exists" 
"/tmp/export-process/test.odt")
   rename-file("test.odt" "/tmp/export-process/")
   (let* ((target-name ...) (target-dir ...) (cmds ...)) (when 
(file-exists-p target) (delete-file target)) (let (... exitcode 
err-string) (message "Creating odt file...") (mapc ... cmds)) 
(rename-file target-name target-dir))
   (let ((xml-files ...)) (when (equal org-lparse-backend ...) (push 
"styles.xml" xml-files)) (mapc (lambda ... ...) xml-files) (let* (... 
... ...) (when ... ...) (let ... ... ...) (rename-file target-name 
target-dir)))
   org-odt-save-as-outfile("/tmp/export-process/test.odt" 
(:latex-image-options nil :exclude-tags ("noexport") :select-tags 
("export") :publishing-directory nil :timestamp nil :expand-quoted-html 
t :html-table-tag "<table border=\"2\" cellspacing=\"0\" 
cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" :xml-declaration 
(("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php 
echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) 
:html-postamble auto :html-preamble t :html-extension "html" 
:inline-images maybe :convert-org-links t :agenda-style nil :style-extra 
"" :style "" :style-include-scripts t :style-include-default t 
:table-auto-headline t :tables t :time-stamp-file t :creator-info t 
:email-info nil :author-info t :email "wiskey5alpha@gmail.com" ...))
   funcall(org-odt-save-as-outfile "/tmp/export-process/test.odt" 
(:latex-image-options nil :exclude-tags ("noexport") :select-tags 
("export") :publishing-directory nil :timestamp nil :expand-quoted-html 
t :html-table-tag "<table border=\"2\" cellspacing=\"0\" 
cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" :xml-declaration 
(("html" . "<?xml version=\"1.0\" encoding=\"%s\"?>") ("php" . "<?php 
echo \"<?xml version=\\\"1.0\\\" encoding=\\\"%s\\\" ?>\"; ?>")) 
:html-postamble auto :html-preamble t :html-extension "html" 
:inline-images maybe :convert-org-links t :agenda-style nil :style-extra 
"" :style "" :style-include-scripts t :style-include-default t 
:table-auto-headline t :tables t :time-stamp-file t :creator-info t 
:email-info nil :author-info t :email "wiskey5alpha@gmail.com" ...))
   (and f (functionp f) (funcall f filename opt-plist))
   (or (and f (functionp f) (funcall f filename opt-plist)) (save-buffer))
   (let ((f ...)) (or (and f ... ...) (save-buffer)))
   (cond ((not to-buffer) (let ... ...) (or ... ...)) ((eq to-buffer 
...) (prog1 ... ...)) (t (current-buffer)))
   (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapc (lambda 
... ...) org-export-plist-vars) (setq umax (if arg ... 
org-export-headline-levels)) (setq umax-toc (if ... ... umax)) (setq 
org-lparse-opt-plist (plist-put org-lparse-opt-plist :headline-levels 
umax)) (when (and org-export-with-toc ...) (setq lines ...)) (unless 
body-only (org-lparse-begin ... opt-plist) (org-lparse-begin ... 
opt-plist)) (setq head-count 0) (org-init-section-numbers) 
(org-lparse-begin-paragraph) (while (setq line ... origline line) (catch 
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) (when 
(org-lparse-current-environment-p ...) (org-lparse-end-environment ...)) 
(org-lparse-end-level 1 umax) (when (and ... 
org-lparse-dyn-first-heading-pos) 
(org-lparse-end-outline-text-or-outline)) (org-lparse-end (quote 
DOCUMENT-BODY) opt-plist) (unless body-only (org-lparse-end ...)) 
(org-lparse-end (quote EXPORT)) (when org-lparse-collect-buffer 
(kill-buffer org-lparse-collect-buffer)) (goto-char (point-min)) (or 
(org-export-push-to-kill-ring ...) (message "Exporting... done")) (cond 
(... ... ...) (... ...) (t ...)))
   (let* (hfy-user-sheet-assoc org-lparse-encode-pending 
org-lparse-par-open (org-lparse-par-open-stashed 0) 
(org-lparse-list-stack ...) org-lparse-list-table-p 
org-lparse-list-table:table-cell-open org-lparse-list-table:table-row 
org-lparse-list-table:lines org-lparse-outline-text-open 
(org-lparse-latex-fragment-fallback ...) 
(org-lparse-insert-tag-with-newlines ...) (org-lparse-to-buffer 
to-buffer) (org-lparse-body-only body-only) 
(org-lparse-entity-control-callbacks-alist ...) 
(org-lparse-entity-format-callbacks-alist ...) (opt-plist ...) 
(body-only ...) valid org-lparse-dyn-first-heading-pos (odd 
org-odd-levels-only) (region-p ...) (rbeg ...) (rend ...) (subtree-p 
...) (level-offset ...) (opt-plist ...) (org-current-export-dir ...) 
(org-current-export-file buffer-file-name) (level 0) (line "") (origline 
"") txt todo (umax nil) (umax-toc nil) (filename ...) (current-dir ...) 
(auto-insert nil) (buffer ...) (org-levels-open ...) (dummy ...) (date 
...) (date ...) (dummy ...) (title ...) (dummy ...) (html-table-tag ...) 
(quote-re0 ...) (quote-re ...) ...) (let (...) (org-unmodified ...)) 
(message "Exporting...") (org-init-section-numbers) (setq 
org-lparse-output-buffer buffer) (set-buffer org-lparse-output-buffer) 
(let (...) (erase-buffer)) (fundamental-mode) (org-install-letbind) (and 
(fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) 
(let (... ...) (mapc ... org-export-plist-vars) (setq umax ...) (setq 
umax-toc ...) (setq org-lparse-opt-plist ...) (when ... ...) (unless 
body-only ... ...) (setq head-count 0) (org-init-section-numbers) 
(org-lparse-begin-paragraph) (while ... ...) (when ... ...) 
(org-lparse-end-level 1 umax) (when ... ...) (org-lparse-end ... 
opt-plist) (unless body-only ...) (org-lparse-end ...) (when 
org-lparse-collect-buffer ...) (goto-char ...) (or ... ...) (cond ... 
... ...)))
   org-do-lparse(3 hidden nil nil nil nil)
   (prog1 (org-do-lparse arg hidden ext-plist to-buffer body-only 
pub-dir) (remove-hook (quote org-export-preprocess-hook) (quote 
org-lparse-strip-experimental-blocks-maybe)) (remove-hook (quote 
org-export-preprocess-after-blockquote-hook) (quote 
org-lparse-preprocess-after-blockquote)))
   (let* ((org-lparse-backend ...) (org-lparse-other-backend ...)) 
(add-hook (quote org-export-preprocess-hook) (quote 
org-lparse-strip-experimental-blocks-maybe)) (add-hook (quote 
org-export-preprocess-after-blockquote-hook) (quote 
org-lparse-preprocess-after-blockquote)) (unless 
(org-lparse-backend-is-native-p native-backend) (error "Don't know how 
to export natively to backend %s" native-backend)) (unless (or ... ...) 
(error "Don't know how to export to backend %s %s" target-backend ...)) 
(run-hooks (quote org-export-first-hook)) (prog1 (org-do-lparse arg 
hidden ext-plist to-buffer body-only pub-dir) (remove-hook ... ...) 
(remove-hook ... ...)))
   org-lparse("odt" "odt" 3 hidden)
   org-lparse-batch("odt")
   org-export-as-odt-batch()
   command-line-1(("--load=/home/aldrichtr/.emacs" "--visit=./test.org" 
"--funcall" "org-export-as-odt-batch"))
   command-line()
   normal-top-level()

aldrichtr@liberty:/tmp/export-process
$ ls
test.odt
aldrichtr@liberty:/tmp/export-process
$

  reply	other threads:[~2012-12-22 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 18:42 Publishing org project as odt Wiskey 5 Alpha
2012-12-22 12:54 ` Jambunathan K
2012-12-22 16:01   ` Wiskey 5 Alpha [this message]
2012-12-22 17:57     ` org-odt: Batch exports creates data loss, deletes original org file Jambunathan K
2012-12-22 17:58     ` Jambunathan K
2012-12-23  7:29       ` bug#13254: " Jambunathan K
2012-12-23  7:29       ` Jambunathan K
     [not found]       ` <87k3s9w7ij.fsf@gmail.com>
2012-12-23 11:47         ` Bastien
2013-01-03  6:43           ` Glenn Morris
2013-01-03  9:15             ` Bastien
2012-12-22 17:32   ` Publishing org project as odt Wiskey 5 Alpha
2012-12-22 17:53   ` Wiskey 5 Alpha
2012-12-22 18:11     ` Jambunathan K
2012-12-22 18:46       ` Wiskey 5 Alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D5D942.6050700@gmail.com \
    --to=wiskey5alpha@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).