emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* odt export to google-docs problem
@ 2011-11-17  9:13 Rustom Mody
  2011-11-17  9:35 ` Jambunathan K
  2011-11-17 10:06 ` Jambunathan K
  0 siblings, 2 replies; 7+ messages in thread
From: Rustom Mody @ 2011-11-17  9:13 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Here is a small file for org mode
----------------
#+OPTIONS: toc:nil
#+TITLE: Report
* Tue 8th
  - http://www.haskell.org/
* hello
----------------
If I export to odt and then upload the odt to google docs, google-docs says
the file is corrupt.

It seems to make a difference whether the EOF is immediately at the end of
"hello" or after a newline -- though not sure.

As far as I can see files made directly by/in libreoffice upload to
google-docs without any problem

org: 7.7
emacs 23.3.1

[And in case line-endings have anything to do with it: OS: Debian/testing]

[-- Attachment #2: Type: text/html, Size: 677 bytes --]

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

* Re: odt export to google-docs problem
  2011-11-17  9:13 odt export to google-docs problem Rustom Mody
@ 2011-11-17  9:35 ` Jambunathan K
  2011-11-17 10:06 ` Jambunathan K
  1 sibling, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2011-11-17  9:35 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode


Rustom

Can you send me this odt file either on or off the list?

Please make sure that the document is not resaved from Libreoffice -
this is because LibreOffice rewrites XML if resaved. So send the file as
soon as it is exported out of org-odt.

What is the org-version?  Are you exporting with a minimal emacs? Just
to be sure it has nothing to do with your local configuration.

You may want to check for corruption using the instructions here.  (I
think the ODF validator has moved elsewhere lately)

,----
|    LibreOffice reports corrupt documents when the XML emitted by the
|    exporter is not well-formed according to OpenDocument schema. To
|    identify the root cause of corruption use one of the following
|    methods:
|    1. Use an Online validator
|       Pass the exported document through the [[http://tools.services.openoffice.org/odfvalidator/][ODF Validator]] and note
|       down the errors.
| 
|    2. Use Emacs' in-built validator. Immediately after exporting
|       1) C-x b test.odt
|       2) Open the `content.xml' file by hitting RET on it
|       3) Do M-x rng-first-error
|       4) Note the error message, the XML markup at the point of error
|          and the surrounding context.
`----


Jambunathan K.


Rustom Mody <rustompmody@gmail.com> writes:

> Here is a small file for org mode
> ----------------
> #+OPTIONS: toc:nil
> #+TITLE: Report
> * Tue 8th
>   - http://www.haskell.org/
> * hello
> ----------------
> If I export to odt and then upload the odt to google docs,
> google-docs says the file is corrupt.
>
> It seems to make a difference whether the EOF is immediately at the
> end of "hello" or after a newline -- though not sure.
>
> As far as I can see files made directly by/in libreoffice upload to
> google-docs without any problem
>
> org: 7.7
> emacs 23.3.1
>
> [And in case line-endings have anything to do with it: OS: Debian/
> testing]
>
>

-- 

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

* Re: odt export to google-docs problem
  2011-11-17  9:13 odt export to google-docs problem Rustom Mody
  2011-11-17  9:35 ` Jambunathan K
@ 2011-11-17 10:06 ` Jambunathan K
  2011-11-17 22:51   ` suvayu ali
  1 sibling, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2011-11-17 10:06 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Rustom Mody <rustompmody@gmail.com> writes:

> Here is a small file for org mode
> ----------------
> #+OPTIONS: toc:nil
> #+TITLE: Report
> * Tue 8th
>   - http://www.haskell.org/
> * hello
> ----------------
> If I export to odt and then upload the odt to google docs,
> google-docs says the file is corrupt.

On my local machine I am seeing that the exported file is valid and
opens fine with LibreOffice-3.4 without any issues.

I haven't experimented with Google docs.


> It seems to make a difference whether the EOF is immediately at the
> end of "hello" or after a newline -- though not sure.
>
> As far as I can see files made directly by/in libreoffice upload to
> google-docs without any problem
>
> org: 7.7
> emacs 23.3.1

Make sure that org-odt is new. Older versions of org-odt did have some
corruption issues.

> [And in case line-endings have anything to do with it: OS: Debian/
> testing]

Can anyone else reproduce this?
-- 

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

* Re: odt export to google-docs problem
  2011-11-17 10:06 ` Jambunathan K
@ 2011-11-17 22:51   ` suvayu ali
  2011-11-18  5:51     ` Jambunathan K
  0 siblings, 1 reply; 7+ messages in thread
From: suvayu ali @ 2011-11-17 22:51 UTC (permalink / raw)
  To: Jambunathan K; +Cc: Rustom Mody, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

Hi Jambunathan,

On Thu, Nov 17, 2011 at 11:06, Jambunathan K <kjambunathan@gmail.com> wrote:
> Can anyone else reproduce this?

I can replicate this. The odt file exported by org-odt is not accepted
by google docs even though libreoffice opens it without problems.
However it I open it with libreoffice and say edit and save, google
docs then accepts the new file.

I have attached both odt files along with the org file.

PS: tested with minimal Emacs 24 and org release_7.7-543-g176ddba

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: odt-test.org --]
[-- Type: text/x-org, Size: 81 bytes --]

#+OPTIONS: toc:nil
#+TITLE: Report
* Tue 8th
  - http://www.haskell.org/
* hello

[-- Attachment #3: odt-test-working.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 12200 bytes --]

[-- Attachment #4: odt-test-buggy.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 8634 bytes --]

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

* Re: odt export to google-docs problem
  2011-11-17 22:51   ` suvayu ali
@ 2011-11-18  5:51     ` Jambunathan K
  2011-11-18 10:11       ` suvayu ali
  2011-11-18 12:06       ` Rustom Mody
  0 siblings, 2 replies; 7+ messages in thread
From: Jambunathan K @ 2011-11-18  5:51 UTC (permalink / raw)
  To: suvayu ali; +Cc: Rustom Mody, emacs-orgmode

Suvayu/Rustom

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Jambunathan,
>
> On Thu, Nov 17, 2011 at 11:06, Jambunathan K <kjambunathan@gmail.com> wrote:
>> Can anyone else reproduce this?
>
> I can replicate this. The odt file exported by org-odt is not accepted
> by google docs even though libreoffice opens it without problems.
> However it I open it with libreoffice and say edit and save, google
> docs then accepts the new file.

With my some experimentation, I am able to reproduce it now. I have this
in my .emacs.

,----
| (setq org-export-odt-prettify-xml t)
`----

and it was preventing me to "see" the problem in the first place.

The above variable is a custom variable and when it is true, the
exporter runs indent-region on all xml files that is part of the final
odt file. The default setting of this variable if off, btw, (as
otherwise it could slow things down for large exported files.)

Since I often have to examine the xml, I have this variable on. 

This setting helps exporting to google directly i.e., I don't have to
edit and resave the file for succesful loading, as Suvayu is suggesting.

Indentation only makes whitespace changes and it shouldn't affect how
XML files are read in. So, I am unable to explain why Google accepts the
indented XML file and not the original one.

Anyways turn that variable on and let me know what you see.

ps: It seems like there is a bug on Google side of things. Since it only
says the file is corrupt and not what the *actual* corruption is I am
out of my wits. So basically I am shooting in the dark ...

Thanks for helping out here. May be as time progresses an understanding
will emerge.


> I have attached both odt files along with the org file.
>
> PS: tested with minimal Emacs 24 and org release_7.7-543-g176ddba

-- 

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

* Re: odt export to google-docs problem
  2011-11-18  5:51     ` Jambunathan K
@ 2011-11-18 10:11       ` suvayu ali
  2011-11-18 12:06       ` Rustom Mody
  1 sibling, 0 replies; 7+ messages in thread
From: suvayu ali @ 2011-11-18 10:11 UTC (permalink / raw)
  To: Jambunathan K; +Cc: Rustom Mody, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Hi Jambunathan,

On Fri, Nov 18, 2011 at 06:51, Jambunathan K <kjambunathan@gmail.com> wrote:
> ,----
> | (setq org-export-odt-prettify-xml t)
> `----
>
> and it was preventing me to "see" the problem in the first place.
>
> The above variable is a custom variable and when it is true, the
> exporter runs indent-region on all xml files that is part of the final
> odt file. The default setting of this variable if off, btw, (as
> otherwise it could slow things down for large exported files.)
>
> Since I often have to examine the xml, I have this variable on.
>

I can confirm, using this setting generates an odt file which google
docs can read without any need for "editing and saving". The file is
attached in case you wanted to see it.

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: odt-test-prettify.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 8662 bytes --]

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

* Re: odt export to google-docs problem
  2011-11-18  5:51     ` Jambunathan K
  2011-11-18 10:11       ` suvayu ali
@ 2011-11-18 12:06       ` Rustom Mody
  1 sibling, 0 replies; 7+ messages in thread
From: Rustom Mody @ 2011-11-18 12:06 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

On Fri, Nov 18, 2011 at 11:21 AM, Jambunathan K <kjambunathan@gmail.com>wrote:

> Suvayu/Rustom
>
> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
> > Hi Jambunathan,
> >
> > On Thu, Nov 17, 2011 at 11:06, Jambunathan K <kjambunathan@gmail.com>
> wrote:
> >> Can anyone else reproduce this?
> >
> > I can replicate this. The odt file exported by org-odt is not accepted
> > by google docs even though libreoffice opens it without problems.
> > However it I open it with libreoffice and say edit and save, google
> > docs then accepts the new file.
>
> With my some experimentation, I am able to reproduce it now. I have this
> in my .emacs.
>
> ,----
> | (setq org-export-odt-prettify-xml t)
> `----
>


Seems to fix the problem  - Thanks.

[As a programmer you do not like the 'fix' -- thats another matter :-) ]

[-- Attachment #2: Type: text/html, Size: 1296 bytes --]

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

end of thread, other threads:[~2011-11-18 12:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17  9:13 odt export to google-docs problem Rustom Mody
2011-11-17  9:35 ` Jambunathan K
2011-11-17 10:06 ` Jambunathan K
2011-11-17 22:51   ` suvayu ali
2011-11-18  5:51     ` Jambunathan K
2011-11-18 10:11       ` suvayu ali
2011-11-18 12:06       ` Rustom Mody

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