From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Schrimshaw Subject: org-odt Date: Sat, 6 Oct 2012 22:46:37 +0100 Message-ID: <20121006214621.GA2287@ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKcD0-0002TC-L6 for emacs-orgmode@gnu.org; Sat, 06 Oct 2012 17:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKcCz-0005FC-9W for emacs-orgmode@gnu.org; Sat, 06 Oct 2012 17:46:54 -0400 Received: from hapkido.dreamhost.com ([66.33.216.122]:55797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKcCy-0005F8-R8 for emacs-orgmode@gnu.org; Sat, 06 Oct 2012 17:46:53 -0400 Received: from homiemail-a28.g.dreamhost.com (caiajhbdcaib.dreamhost.com [208.97.132.81]) by hapkido.dreamhost.com (Postfix) with ESMTP id 6958A16B for ; Sat, 6 Oct 2012 14:46:51 -0700 (PDT) Received: from homiemail-a28.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTP id 78ADC1B4059 for ; Sat, 6 Oct 2012 14:46:50 -0700 (PDT) Received: from ws (cpc11-live23-2-0-cust241.know.cable.virginmedia.com [92.234.171.242]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: will@willschrimshaw.net) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTPSA id 330141B4058 for ; Sat, 6 Oct 2012 14:46:44 -0700 (PDT) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, Did a complete recipe ever surface to fix the issues with the odt exporter, as described here: http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg00459.html (copied below) I'm getting the following error when trying to export to odt: "Cannot find factory styles file. Check package dir layout" I've followed the various instructions mentioned in the above post, specifically: "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)." Unfortuneately this does nothing for me. I'm using emacs and org-mode installed via apt-get in Ubuntu. Is there a better way to do this that would avoid this issue? Cheers, Will. Date: Sun, 12 Aug 2012 12:05:55 +0200 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