Re: [O] odt export to google-docs problem continues

2011-11-24 Thread Jambunathan K
Rustom Mody  writes:

> On Fri, Nov 18, 2011 at 11:21 AM, Jambunathan K <
> kjambunat...@gmail.com> wrote:
>
> Suvayu/Rustom
>
> suvayu ali  writes:
>
> > Hi Jambunathan,
> >
> > On Thu, Nov 17, 2011 at 11:06, Jambunathan K <
> kjambunat...@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)
>
>
> Well now google docs accepts but libreoffice itself says "file is
> corrupt shall I repair?"
> If I take the odt file directly made by exporter direcly in
> googledocs there are lots of spurious spaces eg between bullets and
> the first word.
>
> If I push it through libreoffice and resave then googledocs does a
> better job of displaying

I am not sure what the issue could be. I will have the issue in the
background for now. 

The good thing is atleast a workaround is available.

Jambunathan K.



[O] odt export to google-docs problem continues

2011-11-21 Thread Rustom Mody
On Fri, Nov 18, 2011 at 11:21 AM, Jambunathan K wrote:

> Suvayu/Rustom
>
> suvayu ali  writes:
>
> > Hi Jambunathan,
> >
> > On Thu, Nov 17, 2011 at 11:06, Jambunathan K 
> 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)
>

Well now google docs accepts but libreoffice itself says "file is corrupt
shall I repair?"
If I take the odt file directly made by exporter direcly in googledocs
there are lots of spurious spaces eg between bullets and the first word.

If I push it through libreoffice and resave then googledocs does a better
job of displaying


Re: [O] odt export to google-docs problem

2011-11-18 Thread Rustom Mody
On Fri, Nov 18, 2011 at 11:21 AM, Jambunathan K wrote:

> Suvayu/Rustom
>
> suvayu ali  writes:
>
> > Hi Jambunathan,
> >
> > On Thu, Nov 17, 2011 at 11:06, Jambunathan K 
> 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 :-) ]


Re: [O] odt export to google-docs problem

2011-11-18 Thread suvayu ali
Hi Jambunathan,

On Fri, Nov 18, 2011 at 06:51, Jambunathan K  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.


odt-test-prettify.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] odt export to google-docs problem

2011-11-17 Thread Jambunathan K
Suvayu/Rustom

suvayu ali  writes:

> Hi Jambunathan,
>
> On Thu, Nov 17, 2011 at 11:06, Jambunathan K  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

-- 



Re: [O] odt export to google-docs problem

2011-11-17 Thread suvayu ali
Hi Jambunathan,

On Thu, Nov 17, 2011 at 11:06, Jambunathan K  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.
#+OPTIONS: toc:nil
#+TITLE: Report
* Tue 8th
  - http://www.haskell.org/
* hello


odt-test-working.odt
Description: application/vnd.oasis.opendocument.text


odt-test-buggy.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] odt export to google-docs problem

2011-11-17 Thread Jambunathan K
Rustom Mody  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?
-- 



Re: [O] odt export to google-docs problem

2011-11-17 Thread Jambunathan K

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  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]
>
>

-- 



[O] odt export to google-docs problem

2011-11-17 Thread Rustom Mody
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]