emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernd Haug <bernd.haug@xaidat.com>
To: emacs-orgmode@gnu.org
Subject: Bug: ODT export creates invalid document if literal [8.0-pre (release_8.0-pre-58-g9f1765.dirty @ mixed installation! /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/lisp/ and /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/info/)]
Date: Wed, 13 Mar 2013 16:23:06 +0100	[thread overview]
Message-ID: <CAKjxQA1YbohixO++H=UJ05C3WfGddsn7NhH-sfatjctxd9X72A@mail.gmail.com> (raw)

I am exporting a document to ODT that contains the following text:

blah blah blah =blah <x> blah blah blah...=, blah blah blah
bla bla (bla =bla <x> bla bla bla...= blah). bla blah bla

When opening the document in LibreOffice 3.4, I get the following message:
Read-Error.
Format error discovered in the file in sub-document content.xml at
1837,86(row,col).

I unzipped the ODT file and looked to the named location in content.xml:
blah bla blah blah <text:span text:style-name="OrgCode">blah <x> bla
blah...</text:span>, blah bla blah bla bla
bla bla (bla <text:span text:style-name="OrgCode">blah <x> bla bla
bla...</text:span> blah). blah bla bla

Obviously, the <x> would have to be escaped in the XML output if it
should be presented as intended, but it is interpreted literally as
the == would advise, which causes corruption from the perspective of
LibreOffice.

I would suggest doing the escaping as it seems much more likely that
users want to see such content mono-spaced rather than insert literal
ODT markup.

Quick note on my config: The dirty source directory only contains the
changes from the Makefile-patch I just submitted which allows
installation to locations containing space characters in their path.

------------------------------------------------------------------------


Emacs  : GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2011-10-25 on braeburn.aquamacs.org - Aquamacs Distribution 2.4
Package: Org-mode version 8.0-pre (release_8.0-pre-58-g9f1765.dirty @
mixed installation! /Users/bernd.haug/Library/Application
Support/Aquamacs Emacs/org/lisp/ and
/Users/bernd.haug/Library/Application Support/Aquamacs
Emacs/org/info/)

current state:
==============
(setq
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-export-latex-tables-centered nil
 org-babel-load-languages '((sh . t) (emacs-lisp . t) (python . t))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el"))
 org-export-with-drawers nil
 org-support-shift-select t
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
 org-cycle-hide-drawers org-cycle-hide-inline-tasks
 org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-export-latex-classes '(("doctooleng"
 "\\documentclass{doctooleng}" ("\\chapter{%s}" . "\\chapter*{%s}")
 ("\\section{%s}" . "\\section*{%s}")
			     ("\\subsection{%s}"
 . "\\subsection*{%s}") ("\\subsubsection{%s}"
 . "\\subsubsection*{%s}"))
			    ("xaidat" "\\documentclass{xaidat}"
 ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}"
 . "\\section*{%s}")
			     ("\\subsection{%s}"
 . "\\subsection*{%s}") ("\\subsubsection{%s}"
 . "\\subsubsection*{%s}"))
			    ("article"
 "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
			     ("\\subsubsection{%s}"
 . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
			    ("report" "\\documentclass[11pt]{report}"
 ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}"
 . "\\subsubsection*{%s}"))
			    ("book" "\\documentclass[11pt]{book}"
 ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
			     ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}"
 . "\\subsubsection*{%s}"))
			    ("beamer" "\\documentclass{beamer}" org-beamer-sectioning))
 org-export-with-tags 'not-in-toc
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
 change-major-mode-hook org-show-block-all append local] 5]
		 #[nil "\300\301\302\303\304$\207" [org-add-hook
 change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec
		 org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-backends '(ascii html icalendar latex md odt)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-enforce-todo-dependencies t
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp "\\<Bernd J\\. Haug\\>"
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 )
--text follows this line--

-- 
Senior Software Engineer

Xaidat GmbH
Wickenburggasse 5
8010 Graz
Austria / Europe

web: http://www.xaidat.com/
phone:  +43-676-845023-706
email:   bernd.haug@xaidat.com

FN 384295s, LG ZRS Graz
UID-Nr. ATU67414611

             reply	other threads:[~2013-03-13 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 15:23 Bernd Haug [this message]
2013-03-13 16:03 ` Bug: ODT export creates invalid document if literal [8.0-pre (release_8.0-pre-58-g9f1765.dirty @ mixed installation! /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/lisp/ and /Users/bernd.haug/Library/Application Support/Aquamacs Emacs/org/info/)] Bastien

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='CAKjxQA1YbohixO++H=UJ05C3WfGddsn7NhH-sfatjctxd9X72A@mail.gmail.com' \
    --to=bernd.haug@xaidat.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).