* org-odt: Batch exports creates data loss, deletes original org file
[not found] ` <50D5D942.6050700@gmail.com>
@ 2012-12-22 17:57 ` Jambunathan K
[not found] ` <handler.13253.B.135619890227781.ack@debbugs.gnu.org>
2012-12-22 17:58 ` org-odt: Batch exports creates data loss, deletes original org file Jambunathan K
1 sibling, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2012-12-22 17:57 UTC (permalink / raw)
To: bug-gnu-emacs; +Cc: emacs-orgmode, Wiskey 5 Alpha
> 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 !
Data loss is very bad. I am sorry. Looks like you hope you had
backups.
I will forward a fix to Org/Emacs in few hours.
> $ emacs --batch --load=$HOME/.emacs --visit=./test.org --funcall
> org-export-as-odt-batch
Meanwhile, instead of using `org-export-as-odt-batch', you can try the
following which uses `org-export-as-odt'.
$ emacs --batch -Q -L ~/src/org-mode/lisp --visit=./test-new.org --funcall
org-export-as-odt
> 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
> $
>
>
>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* org-odt: Batch exports creates data loss, deletes original org file
[not found] ` <50D5D942.6050700@gmail.com>
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
1 sibling, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2012-12-22 17:58 UTC (permalink / raw)
To: bug-gnu-emacs; +Cc: emacs-orgmode, Wiskey 5 Alpha
> 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 !
Data loss is very bad. I am sorry. Looks like you had backups.
I will forward a fix to Org/Emacs in few hours.
> $ emacs --batch --load=$HOME/.emacs --visit=./test.org --funcall
> org-export-as-odt-batch
Meanwhile, instead of using `org-export-as-odt-batch', you can try the
following which uses `org-export-as-odt'.
$ emacs --batch -Q -L ~/src/org-mode/lisp --visit=./test-new.org --funcall
org-export-as-odt
> 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
> $
>
>
>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13253: Acknowledgement (org-odt: Batch exports creates data loss, deletes original org file)
[not found] ` <handler.13253.B.135619890227781.ack@debbugs.gnu.org>
@ 2012-12-22 18:01 ` Jambunathan K
2012-12-22 18:25 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Jambunathan K @ 2012-12-22 18:01 UTC (permalink / raw)
To: 13253
This bug is an exact copy of bug#13254. Apologies. E-mail got sent
twice accidentally.
help-debbugs@gnu.org (GNU bug Tracking System) writes:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> bug-gnu-emacs@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 13253@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13253: Acknowledgement (org-odt: Batch exports creates data loss, deletes original org file)
2012-12-22 18:01 ` bug#13253: Acknowledgement (org-odt: Batch exports creates data loss, deletes original org file) Jambunathan K
@ 2012-12-22 18:25 ` Glenn Morris
0 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2012-12-22 18:25 UTC (permalink / raw)
To: Jambunathan K; +Cc: 13253
Jambunathan K wrote:
> This bug is an exact copy of bug#13254. Apologies. E-mail got sent
> twice accidentally.
13253 will be deleted.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13254: org-odt: Batch exports creates data loss, deletes original org file
2012-12-22 17:58 ` org-odt: Batch exports creates data loss, deletes original org file Jambunathan K
@ 2012-12-23 7:29 ` Jambunathan K
2012-12-23 11:47 ` Bastien
[not found] ` <87zk153s7l.fsf@bzg.ath.cx>
0 siblings, 2 replies; 8+ messages in thread
From: Jambunathan K @ 2012-12-23 7:29 UTC (permalink / raw)
To: 13254, Bastien; +Cc: wiskey5alpha
Bastien
I have pushed a fix to my private branch (see below). Please merge both
`maint' AND `master' branches.
`maint' branch
- has 2 fixes for org-odt.el
`master' branch
- above fixes
- New exporter changes.
,---- http://repo.or.cz/w/org-mode/org-kjn.git
|
| URL: git://repo.or.cz/org-mode/org-kjn.git
| http://repo.or.cz/r/org-mode/org-kjn.git
|
| Push URL: ssh://repo.or.cz/srv/git/org-mode/org-kjn.git
|
`----
,---- git log --format=oneline upstream/maint..
|
| 82e061 org-odt.el: Fix Emacs Bug#13254
| 443542 org-odt.el: Correctly format link to headlines that have
|
`----
,---- git log --format=oneline upstream/master..
|
| 507ce4 org-odt.el: Fix Emacs Bug#13254
| 0754e3 org-e-odt.el: Handle links to target, list items
| ad2ee6 org-e-odt.el: Handle links to headline, table etc that h
| 3a2b5d org-odt.el: Correctly format link to headlines that have
| c4597f org-e-odt.el: Handle clickable images
| a7ad1c org-e-odt.el: Use `org-export-data-with-translations'
| 76d529 org-e-odt.el: Support for short captions
| 9d496c org-e-odt.el: Port fix for Bug#13197
| 9d56ba org-e-odt.el: Fix typesetting of Math formulae
| fe0b1c org-e-odt.el: Add frame title and description to latex e
| 6faf36 org-odt.el: Improve TOC entries
| d9d62a org-e-odt.el: Emit priority in headlines, right justify
| 533c8a org-e-odt.el: Not all keywords are supported
| 1e30ef org-e-odt.el: Use new version of org-export-get-previous
| 84eadb org-e-odt.el: New experimental option `org-e-odt-use-dat
| 64b7c8 Fix Table of Contents, Clock block and various styles
| acbb74 org-e-odt.el: Fix export issues on Windows XP
| a2f5d8 org-e-odt.el: Honor `org-export-with-date'
| 087936 Update OpenDocument schema files to v1.2 OASIS standard
| d904e5 OrgOdtStyles.xml, OrgOdtContentTemplate.xml: Refresh
|
`----
Jambunathan K <kjambunathan@gmail.com> writes:
>> 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 !
>
> Data loss is very bad. I am sorry. Looks like you had backups.
>
> I will forward a fix to Org/Emacs in few hours.
>
>> $ emacs --batch --load=$HOME/.emacs --visit=./test.org --funcall
>> org-export-as-odt-batch
>
> Meanwhile, instead of using `org-export-as-odt-batch', you can try the
> following which uses `org-export-as-odt'.
>
> $ emacs --batch -Q -L ~/src/org-mode/lisp --visit=./test-new.org --funcall
> org-export-as-odt
>
>
>> 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
>> $
>>
>>
>>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13254: org-odt: Batch exports creates data loss, deletes original org file
2012-12-23 7:29 ` bug#13254: " Jambunathan K
@ 2012-12-23 11:47 ` Bastien
[not found] ` <87zk153s7l.fsf@bzg.ath.cx>
1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2012-12-23 11:47 UTC (permalink / raw)
To: Jambunathan K; +Cc: 13254, wiskey5alpha
Hi Jambunathan,
Jambunathan K <kjambunathan@gmail.com> writes:
> I have pushed a fix to my private branch (see below). Please merge both
> `maint' AND `master' branches.
Done. Thanks a lot for continuing this work!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13254: org-odt: Batch exports creates data loss, deletes original org file
[not found] ` <87zk153s7l.fsf@bzg.ath.cx>
@ 2013-01-03 6:43 ` Glenn Morris
[not found] ` <srpq1mbwbz.fsf@fencepost.gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2013-01-03 6:43 UTC (permalink / raw)
To: Bastien; +Cc: 13254, Jambunathan K, wiskey5alpha
Please can we have the relevant patch installed in emacs-24.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13254: org-odt: Batch exports creates data loss, deletes original org file
[not found] ` <srpq1mbwbz.fsf@fencepost.gnu.org>
@ 2013-01-03 9:15 ` Bastien
0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2013-01-03 9:15 UTC (permalink / raw)
To: Glenn Morris; +Cc: 13254, Jambunathan K, wiskey5alpha
Hi Glenn,
Glenn Morris <rgm@gnu.org> writes:
> Please can we have the relevant patch installed in emacs-24.
I plan to release Org 7.9.3 before the end of the week, most
probably on sunday eve. I will do the merge then.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-03 9:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <50D4ADAF.2050800@gmail.com>
[not found] ` <87txredz7h.fsf@gmail.com>
[not found] ` <50D5D942.6050700@gmail.com>
2012-12-22 17:57 ` org-odt: Batch exports creates data loss, deletes original org file Jambunathan K
[not found] ` <handler.13253.B.135619890227781.ack@debbugs.gnu.org>
2012-12-22 18:01 ` bug#13253: Acknowledgement (org-odt: Batch exports creates data loss, deletes original org file) Jambunathan K
2012-12-22 18:25 ` Glenn Morris
2012-12-22 17:58 ` org-odt: Batch exports creates data loss, deletes original org file Jambunathan K
2012-12-23 7:29 ` bug#13254: " Jambunathan K
2012-12-23 11:47 ` Bastien
[not found] ` <87zk153s7l.fsf@bzg.ath.cx>
2013-01-03 6:43 ` Glenn Morris
[not found] ` <srpq1mbwbz.fsf@fencepost.gnu.org>
2013-01-03 9:15 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).