emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Testing org-export-as-odt-and-open
@ 2011-09-24 22:41 Eric Belpaire
  2011-09-25 19:08 ` Jambunathan K
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Belpaire @ 2011-09-24 22:41 UTC (permalink / raw)
  To: emacs-orgmode

Hello 

I'm testing org-export-as-odt-and-open on Jambunathan's test.org file. 
I get error message "Unable to create odt file (53)". 

Is this caused by the fact that files are created in different directories?
a) org-export-as-odt-and-open creates the file e:/User/home/pub_html/test.odt
wheras 
b) the xml files are written in directory c:/Documents and
Settings/GCVD3476/Local Settings/Temp/odt-4928fzB/

The debugger is entered when: Creating odt file using "zip -rmTq test.odt ."

Did I forget to configure some variable or should I configure variable
org-export-publishing-directory (currently: "e:/User/home/pub_html/") 
differently? 

Below an extract from *Messages* and *Backtrace* buffers. 

Cordially, 
Eric 

Export buffer: 
Exporting to ODT using org-lparse...
Using vacuous schema [3 times]
c:/DOCUME~1/User/LOCALS~1/Temp/odt-4928fzB/content.xml and 
c:/Documents and Settings/User/Local Settings/Temp/odt-4928fzB/content.xml
are the same file
org-babel-exp processing... [3 times]
Position saved to mark ring, go back with C-c &.
executing Org code block...
"* Some Appointment
  SCHEDULED: <2010-11-17 Wed>"
org-babel-exp processing...
Use of MathJax is incompatible with ODT exporter. Using verbatim instead.
Exporting...
Embedding ./org-mode-unicorn.png as
Pictures/691b2c669141aa68f784d83e5c853f2b350b445f.png ... [5 times]
Found table.el-type table in the source org file. table.el doesn't support ODT
backend. Skipping ahead ... [2 times]
Using schema
~/.emacs.d/elpa/org-odt-20110702/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
ODT export done, pushed to kill ring and clipboard
Using schema
~/.emacs.d/elpa/org-odt-20110702/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
(No changes need to be saved)
Switching to directory c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/
Saving file c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/META-INF/manifest.xml...
Wrote c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/META-INF/manifest.xml
Saving file c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/content.xml...
Wrote c:/Documents and Settings/User/Local Settings/Temp/odt-4928fzB/content.xml
Saving file c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/meta.xml...
Wrote c:/Documents and Settings/User/Local Settings/Temp/odt-4928fzB/meta.xml
Saving file c:/Documents and Settings/User/Local
Settings/Temp/odt-4928fzB/styles.xml...
Wrote c:/Documents and Settings/User/Local Settings/Temp/odt-4928fzB/styles.xml
Creating odt file using "zip -rmTq test.odt ."
Entering debugger...


Debugger entered--Lisp error: (error "Unable to create odt file (53)")
  signal(error ("Unable to create odt file (53)"))
  error("Unable to create odt file (%S)" 53)
  org-odt-save-as-outfile("e:/User/home/pub_html/test.odt" 
(:latex-image-options nil :exclude-tags ("noexport") :select-tags ("export")
:publishing-directory "~/pub_html" :timestamp nil :expand-quoted-html t 
:html-table-tag "<tableborder=\"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
"" :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 "kjambunathan@gmail.com" ...))
  org-do-lparse(nil hidden nil nil nil nil)
  org-lparse("odt" "odt" nil hidden)
  org-lparse-and-open("odt" "odt" nil)
  org-export-as-odt-and-open(nil)
  call-interactively(org-export-as-odt-and-open)
  org-export(nil)
  call-interactively(org-export nil nil) 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-09-24 22:41 Testing org-export-as-odt-and-open Eric Belpaire
@ 2011-09-25 19:08 ` Jambunathan K
  2011-09-26 22:13   ` Eric Belpaire
  2011-10-09 16:23   ` Eric Belpaire
  0 siblings, 2 replies; 7+ messages in thread
From: Jambunathan K @ 2011-09-25 19:08 UTC (permalink / raw)
  To: Eric Belpaire; +Cc: emacs-orgmode


Hello Eric

> Hello 
>
> I'm testing org-export-as-odt-and-open on Jambunathan's test.org file. 
> I get error message "Unable to create odt file (53)". 

What version of zip are you using. 53 that you see here is the exit code
from the zip command. I am not sure what that error means. 

Does the failure happen always or transitorily?

> Is this caused by the fact that files are created in different directories?
> a) org-export-as-odt-and-open creates the file e:/User/home/pub_html/test.odt
> wheras 
> b) the xml files are written in directory c:/Documents and
> Settings/GCVD3476/Local Settings/Temp/odt-4928fzB/

What the exporter does is this,

$ cd tmp-dir
$ zip -rmTq test.odt .
$ mv test.odt pub-dir
$ rm tmp-dir

When the zip command fails, you can replay the above sequence by hand
and see what error zip is generating

OR

> ~/.emacs.d/elpa/org-odt-20110702/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc

That version is almost 3 months old. I have made lots of bug fixes and
improvments since then. I have also modified the exporter a few minutes
ago so that the output from the zip command also appears in the
*Messages* buffer.

I STRONGLY RECOMMEND that you switch to the development version of
Orgmode. Please refer to http://orgmode.org/worg/org-faq.html - sections
"How do I keep current with bleeding edge development?" or "I don't use
git. Can I download bleeding edge .zip and .tar.gz archives?"

If you would very much want to work only with ELPA tarballs, maybe you
should wait for a day or two. I was planning to build one anyways and
now I have an excuse why I should build one.

> The debugger is entered when: Creating odt file using "zip -rmTq test.odt ."
>
> Did I forget to configure some variable or should I configure variable
> org-export-publishing-directory (currently: "e:/User/home/pub_html/") 
> differently? 

May be you can try resetting org-export-publishing-directory to nil just
for testing purposes and see whether it makes any difference.

> Below an extract from *Messages* and *Batmcktrace* buffers. 
>
> Cordially, 
> Eric 
.>
> Debugger entered--Lisp error: (error "Unable to create odt file (53)")
>   signal(error ("Unable to create odt file (53)"))
>   error("Unable to create odt file (%S)" 53)
>   org-odt-save-as-outfile("e:/User/home/pub_html/test.odt" 
> (:latex-image-options nil :exclude-tags ("noexport") :select-tags ("export")
> :publishing-directory "~/pub_html" :timestamp nil :expand-quoted-html t 
> :html-table-tag "<tableborder=\"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
> "" :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 "kjambunathan@gmail.com" ...))
>   org-do-lparse(nil hidden nil nil nil nil)
>   org-lparse("odt" "odt" nil hidden)
>   org-lparse-and-open("odt" "odt" nil)
>   org-export-as-odt-and-open(nil)
>   call-interactively(org-export-as-odt-and-open)
>   org-export(nil)
>   call-interactively(org-export nil nil) 
-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-09-25 19:08 ` Jambunathan K
@ 2011-09-26 22:13   ` Eric Belpaire
  2011-10-09 16:23   ` Eric Belpaire
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Belpaire @ 2011-09-26 22:13 UTC (permalink / raw)
  To: Jambunathan K, emacs-orgmode

Hi Jambunathan

On 25/09/2011 21:08, Jambunathan K wrote:
> Hello Eric
>
>> Hello
>>
>> I'm testing org-export-as-odt-and-open on Jambunathan's test.org file.
>> I get error message "Unable to create odt file (53)".
> What version of zip are you using.
> What the exporter does is this,
>
> $ cd tmp-dir
> $ zip -rmTq test.odt .
> $ mv test.odt pub-dir
> $ rm tmp-dir
>
> When the zip command fails, you can replay the above sequence by hand
> and see what error zip is generating
thanks for the tip.
It allowed me to find out that a dll was missing for zip.
That's fixed now.
> OR
>
>> ~/.emacs.d/elpa/org-odt-20110702/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
> That version is almost 3 months old. I have made lots of bug fixes and
> improvments since then. I have also modified the exporter a few minutes
> ago so that the output from the zip command also appears in the
> *Messages* buffer.
>
> I STRONGLY RECOMMEND that you switch to the development version of
> Orgmode. Please refer to http://orgmode.org/worg/org-faq.html - sections
> "How do I keep current with bleeding edge development?" or "I don't use
> git. Can I download bleeding edge .zip and .tar.gz archives?"
>
> If you would very much want to work only with ELPA tarballs, maybe you
> should wait for a day or two. I was planning to build one anyways and
> now I have an excuse why I should build one.
I'm using org-odt-20110702.
I'll wait a couple of days for the ELPA tarball, as haven't used git yet.

Thanks and thanks for this very interesting exporter !
Eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-09-25 19:08 ` Jambunathan K
  2011-09-26 22:13   ` Eric Belpaire
@ 2011-10-09 16:23   ` Eric Belpaire
  2011-10-09 19:51     ` Jambunathan K
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Belpaire @ 2011-10-09 16:23 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Hi Jambunathan

On 25/09/2011 21:08, Jambunathan K wrote:
>
> I STRONGLY RECOMMEND that you switch to the development version of
> Orgmode. Please refer to http://orgmode.org/worg/org-faq.html - sections
> "How do I keep current with bleeding edge development?" or "I don't use
> git. Can I download bleeding edge .zip and .tar.gz archives?"
>
> If you would very much want to work only with ELPA tarballs, maybe you
> should wait for a day or two. I was planning to build one anyways and
> now I have an excuse why I should build one.

I'm trying git out.

I got the following message:
"Debugger entered--Lisp error: (invalid-function assert)
   assert(t t)
   org-lparse-backend-get("odt" ENTITY-CONTROL nil)
   org-lparse-get(ENTITY-CONTROL)
   org-do-lparse(nil nil nil nil nil nil)
   org-lparse("odt" "odt" nil nil nil nil nil nil)
   org-export-as-odt(nil)
   call-interactively(org-export-as-odt)
   org-export(nil)
   call-interactively(org-export nil nil)"

Have you been able to build the ELPA tarball?
If so, where can I find it?

Thanks and thanks for this very interesting exporter !
Eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-10-09 16:23   ` Eric Belpaire
@ 2011-10-09 19:51     ` Jambunathan K
  2011-10-10  7:13       ` Eric Belpaire
  0 siblings, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2011-10-09 19:51 UTC (permalink / raw)
  To: Eric Belpaire; +Cc: emacs-orgmode


> Have you been able to build the ELPA tarball?
> If so, where can I find it?

I have uploaded a new org-odt-20111010.tar here.

,----[ C-h v package-archives RET ]
| package-archives is a variable defined in `package.el'.
| Its value is
| (("gnu" . "http://elpa.gnu.org/packages/")
|  ("org-odt" . "http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/packages/"))
| 
| Original value was 
| (("gnu" . "http://elpa.gnu.org/packages/"))
| 
| [back]
`----

The test file is in this directory:

"~/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/test.org"

Let me know if you run in to any issues.

ps: At this moment, I am not sure what the problem with your git
installation is. May be you can discard your git setup for now ???

Jambunathan K.

-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-10-09 19:51     ` Jambunathan K
@ 2011-10-10  7:13       ` Eric Belpaire
  2011-10-10 11:54         ` Jambunathan K
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Belpaire @ 2011-10-10  7:13 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Thanks.
This mail replaces my earlier mail.

I discarded the git setup and I tried org-mode + org-odt by using ONLY 
the ELPA tarballs.

On 09/10/2011 21:51, Jambunathan K wrote:
>> Have you been able to build the ELPA tarball?
>> If so, where can I find it?
> I have uploaded a new org-odt-20111010.tar here.
>
> ,----[ C-h v package-archives RET ]
> | package-archives is a variable defined in `package.el'.
> | Its value is
> | (("gnu" . "http://elpa.gnu.org/packages/")
> |  ("org-odt" . "http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/packages/"))
The above gives me the error: "404 - Cannot find file".
So, I used: http://repo.or.cz/w/org-mode/org-jambu.git/blob/HEAD:/packages/
As my emacs-version is "GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
of 2009-11-04 on LENNART-69DE564 (patched)",
I'm using package-install-file to install the ELPA tarballs.

I downloaded the latest tarball from Org-mode repo. 
http://orgmode.org/pkg/daily/ i.e.: org-20111009.tar

package-install-file "~/.emacs.d/org-20111009.tar"

http://repo.or.cz/w/org-mode/org-jambu.git/blob/HEAD:/packages/org-odt-20111010.tar 
when downloaded gives me: packages_org-odt-20111010.tar
mv ~/.emacs.d/packages_org-odt-20111010.tar ~/.emacs.d/org-odt-20111010.tar
package-install-file "~/.emacs.d/org-odt-20111010.tar"

> The test file is in this directory:
>
> "~/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/test.org"
>
> Let me know if you run in to any issues.
>
In order to not use nxhtml that is part of EmacsW32, I've set 
nxhtml-load to nil.  This is irrelevant, because setting nxhtml-load to 
t doesn't change the results.

This results in:
Loading nxml-mode...done
Using schema 
~/.emacs.d/elpa/org-odt-20111010/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc

When trying the c-c c-e O on test.org, I get the following in *Messages*:
Export buffer:
Exporting to ODT using org-lparse...
Using vacuous schema
c:/DOCUME~1/GCVD3476/LOCALS~1/Temp/odt-30312juB/content.xml and 
c:/Documents and Settings/GCVD3476/Local 
Settings/Temp/odt-30312juB/content.xml are the same file
LaTeX to MathML converter not available. Using verbatim instead. [8 times]
org-babel-exp processing... [3 times]
Position saved to mark ring, go back with C-c &.
executing Org code block...
"* Some Appointment
SCHEDULED: <2010-11-17 Wed>"
org-babel-exp processing... [3 times]
LaTeX to MathML converter not available. Using verbatim instead.
Exporting...
Embedding ./org-mode-unicorn.png as Images/0001.png ...
Not a PNG file: 
`e:/User/home/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/org-mode-unicorn.png'
Embedding ./org-mode-unicorn.png as Images/0002.png ...
Not a PNG file: 
`e:/User/home/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/org-mode-unicorn.png'
Embedding ./org-mode-unicorn.png as Images/0003.png ...
Embedding ./org-mode-unicorn.png as Images/0004.png ...
Not a PNG file: 
`e:/User/home/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/org-mode-unicorn.png'
Embedding ./org-mode-unicorn.png as Images/0005.png ...
Not a PNG file: 
`e:/User/home/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/org-mode-unicorn.png'
Found table.el-type table in the source org file. table.el doesn't 
support ODT backend. Skipping ahead ... [2 times]
Using schema 
~/.emacs.d/elpa/org-odt-20111010/contrib/odt/etc/schema/od-schema-v1.2-cs01.rnc
apply: Wrong number of arguments: #[(label category seqno fmt1 fmt2) "\b„
[label save-match-data-internal fmt2 category seqno fmt1 signal 
cl-assertion-failed match-data ((byte-code "Á\bÂ\"‡" 
[save-match-data-internal set-match-data evaporate] 3)) ...] 9], 2

Here is the *Backtrace*:
Debugger entered--Lisp error: (wrong-number-of-arguments #[(label 
category seqno fmt1 fmt2) "\204
<skipping some garbage>
[label save-match-data-internal fmt2 category seqno fmt1 signal 
cl-assertion-failed match-data ((byte-code "\301\b\302\"\207" 
[save-match-data-internal set-match-data evaporate] 3)) 
org-odt-format-tags ("<text:sequence-ref text:reference-format=\"%s\" 
text:ref-name=\"%s\">" . "</text:sequence-ref>") format-spec 101 110 
format "%d"] 9] 2)
   org-odt-format-label-reference("category-and-value" "%e %n")
   apply(org-odt-format-label-reference ("category-and-value" "%e %n"))
   org-odt-fixup-label-references()
   org-odt-end-export()
   apply(org-odt-end-export nil)
   org-lparse-end(EXPORT)
   org-do-lparse(nil hidden nil nil nil nil)
   org-lparse("odt" "odt" nil hidden)
   org-lparse-and-open("odt" "odt" nil)
   org-export-as-odt-and-open(nil)
   call-interactively(org-export-as-odt-and-open)
   org-export(nil)
   call-interactively(org-export nil nil)


What did I do incorrectly?
Am I missing some configuration?

BTW: when I used org-jambu.git AND nxhtml that is part of EmacsW32,
I managed to generate a test.dot file that was misformed at: 
"</div></text:sequence-ref>"

" Please refer to @&lt;text:sequence-ref 
text:reference-format="category-and-value" text:ref-name="<div 
class="figure">
<p><img src="1024" alt="fig:1024" width="300" height="300" /></p>
</div>"&gt;<div class="figure">
<p><img src="1024" alt="fig:1024" width="300" height="300" /></p>
</div></text:sequence-ref> for further information.
"

I suppose this is due to the schema that comes with nxhtml in EmacsW32.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Testing org-export-as-odt-and-open
  2011-10-10  7:13       ` Eric Belpaire
@ 2011-10-10 11:54         ` Jambunathan K
  0 siblings, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2011-10-10 11:54 UTC (permalink / raw)
  To: Eric Belpaire; +Cc: emacs-orgmode


Hello Eric,

> When trying the c-c c-e O on test.org, I get the following in
> *Messages*:

> apply: Wrong number of arguments: #[(label category seqno fmt1 fmt2) "\b„
> [label save-match-data-internal fmt2 category seqno fmt1 signal
> cl-assertion-failed match-data ((byte-code "Á\bÂ\"‡"
> [save-match-data-internal set-match-data evaporate] 3)) ...] 9], 2

This is a bug in the odt exporter.  I have fixed it in
org-odt-20111011.tar.

> Not a PNG file:
> e:/User/home/.emacs.d/elpa/org-odt-20111010/contrib/odt/tests/org-mode-unicorn.png'
This is a bug in the Emacs core and I had fixed it in Emacs-24. See
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8870

The image above is the same as this:
http://orgmode.org/img/org-mode-unicorn.png

One can also copy a "good" png image on the local system, re-name it as
org-mode-unicorn.png and copy it to the test.org dir.


>> I have uploaded a new org-odt-20111010.tar here.
>>
>> ,----[ C-h v package-archives RET ]
>> | package-archives is a variable defined in `package.el'.
>> | Its value is
>> | (("gnu" . "http://elpa.gnu.org/packages/")
>> |  ("org-odt"
>> | . "http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/packages/"))
> The above gives me the error: "404 - Cannot find file".
> So, I used:
> http://repo.or.cz/w/org-mode/org-jambu.git/blob/HEAD:/packages/

You will get the 404 error if you browse to the above URL say in
firefox.  Nonetheless you will be still be able to install with M-x
list-packages RET etc etc route without any issues. 

> BTW: when I used org-jambu.git AND nxhtml that is part of EmacsW32,
> I managed to generate a test.dot file that was misformed at:
> "</div></text:sequence-ref>"
>
> " Please refer to @&lt;text:sequence-ref
> text:reference-format="category-and-value" text:ref-name="<div
> class="figure">
> <p><img src="1024" alt="fig:1024" width="300" height="300" /></p>
> </div>"&gt;<div class="figure">
> <p><img src="1024" alt="fig:1024" width="300" height="300" /></p>
> </div></text:sequence-ref> for further information.
> "

This seems a mish-mash of html and odt markups.

> I suppose this is due to the schema that comes with nxhtml in
> EmacsW32.

If I go by this post by Lennart
http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00783.html

I would assume that there is a "very old" org-odt.el that is bundled
with nxhtml distribution. So an "undesirable" interference from
nxhtml/EmacsW32 cannot be totalled ruled out.

Unless you have a very strong reason to use EmacsW32, I would recommend
that you switch to "official" builds from gnu.org.

http://alpha.gnu.org/gnu/emacs/windows/?C=M;O=D

Jambunathan K.
-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-10 11:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-24 22:41 Testing org-export-as-odt-and-open Eric Belpaire
2011-09-25 19:08 ` Jambunathan K
2011-09-26 22:13   ` Eric Belpaire
2011-10-09 16:23   ` Eric Belpaire
2011-10-09 19:51     ` Jambunathan K
2011-10-10  7:13       ` Eric Belpaire
2011-10-10 11:54         ` Jambunathan K

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).