* problem with odt export, emacs 23.3.1 on Ubuntu 12.04 LTS
@ 2012-08-12 10:05 Fabio Rinaldi
2012-08-12 18:40 ` Jambunathan K
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Rinaldi @ 2012-08-12 10:05 UTC (permalink / raw)
To: emacs-orgmode
I always had a problem in exporting org mode files to odt format
and finally I have found the reason of the problem and a solution.
I use org mode within emacs 23.3.1 on Ubuntu 12.04 LTS
(all tools standard distribution).
The otd export elisp file is placed here:
/usr/share/emacs/site-lisp/org-mode/org-odt.el
If I understand correctly, it searches for the styles and schemas
starting from there:
(defconst org-odt-lib-dir (file-name-directory load-file-name))
(defconst org-odt-styles-dir
(let* ((styles-dir1 (expand-file-name "../etc/styles/" org-odt-lib-dir))
(styles-dir2 (expand-file-name "./etc/styles/" org-odt-lib-dir))
...
(defcustom org-export-odt-schema-dir
(let ((schema-dir (expand-file-name
"../contrib/odt/etc/schema/" org-odt-lib-dir)))
....
This does not work with the configuration above, because:
A) the schema files are at a completely different location
B) the style files are entirely missing
C) the call to "load-file-name" for some reason fails, preventing
the whole file from being loaded
As a workaround, I copied over the style files, manually
fixed "org-odt-styles-dir" and " org-export-odt-schema-dir" in
org-odt.el, and commented out the line which causes
problem (C).
This works - but a more flexible solution should be found so
that org-odt does not break again.
I hope this can be useful to the org community - although it might
be that in the meantime somebody else already fixed the problem.
Fabio Rinaldi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problem with odt export, emacs 23.3.1 on Ubuntu 12.04 LTS
2012-08-12 10:05 problem with odt export, emacs 23.3.1 on Ubuntu 12.04 LTS Fabio Rinaldi
@ 2012-08-12 18:40 ` Jambunathan K
0 siblings, 0 replies; 2+ messages in thread
From: Jambunathan K @ 2012-08-12 18:40 UTC (permalink / raw)
To: Fabio Rinaldi; +Cc: emacs-orgmode
Fabio
Thanks for going through all this trouble. Please post an updated
recipe so that others can benefit.
Did you look at `org-odt-data-dir', `org-odt-schema-dir-list' and
`org-odt-styles-dir-list'?
You can solve the issue by any one of the following ways:
1. Copy the style and schema files to `data-directory'. This is same as
the etc/ directory of your Emacs executable.
M-: data-directory
Hint: Just follow the error messages and you will be able to make out
where they should go under etc/
2. Set the `org-odt-data-dir' variable.
Look at where the .xml files are currently installed in your machine
and set this variable to the *parent directory* of styles and schema
files.
,---- From org-odt.el
| (and org-odt-data-dir
| (expand-file-name "./styles/" org-odt-data-dir))
`----
,---- From org-odt.el
| (and org-odt-data-dir
| (expand-file-name "./schema/" org-odt-data-dir))
`----
Something like this in your .emacs will do the trick.
(eval-after-load 'org
'(setq org-odt-data-dir "path/to/the/parent/of/styles/file"))
3. Look at the Makefile.
There are a couple of variables that influence where style and schema
files should go under. Here is the original thread where the issue
was discussed. (It was in the cotext of Gentoo)
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00850.html
> I always had a problem in exporting org mode files to odt format
> and finally I have found the reason of the problem and a solution.
>
> I use org mode within emacs 23.3.1 on Ubuntu 12.04 LTS
> (all tools standard distribution).
>
> The otd export elisp file is placed here:
>
> /usr/share/emacs/site-lisp/org-mode/org-odt.el
>
> If I understand correctly, it searches for the styles and schemas
> starting from there:
>
> (defconst org-odt-lib-dir (file-name-directory load-file-name))
> (defconst org-odt-styles-dir
> (let* ((styles-dir1 (expand-file-name "../etc/styles/" org-odt-lib-dir))
> (styles-dir2 (expand-file-name "./etc/styles/" org-odt-lib-dir))
> ...
>
>
> (defcustom org-export-odt-schema-dir
> (let ((schema-dir (expand-file-name
> "../contrib/odt/etc/schema/" org-odt-lib-dir)))
> ....
>
> This does not work with the configuration above, because:
>
> A) the schema files are at a completely different location
> B) the style files are entirely missing
> C) the call to "load-file-name" for some reason fails, preventing
> the whole file from being loaded
>
> As a workaround, I copied over the style files, manually
> fixed "org-odt-styles-dir" and " org-export-odt-schema-dir" in
> org-odt.el, and commented out the line which causes
> problem (C).
>
> This works - but a more flexible solution should be found so
> that org-odt does not break again.
>
> I hope this can be useful to the org community - although it might
> be that in the meantime somebody else already fixed the problem.
>
> Fabio Rinaldi
>
>
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-12 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-12 10:05 problem with odt export, emacs 23.3.1 on Ubuntu 12.04 LTS Fabio Rinaldi
2012-08-12 18:40 ` 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).