From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: [BUG][ODT] ODT_STYLES_FILE not read as a list Date: Tue, 06 Nov 2018 16:35:50 +0100 Message-ID: <87r2fyxlpl.fsf@christianmoe.com> References: <8736snjh60.fsf@christianmoe.com> <87r2g08pn8.fsf@nicolasgoaziou.fr> <87a7mnewov.fsf@christianmoe.com> <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK3i7-00013R-MN for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:56:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gK3i2-0001q0-MM for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:56:11 -0500 Received: from mailer-211-145.hitrost.net ([91.185.211.145]:28561) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gK3i2-0001oC-F7 for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:56:06 -0500 In-reply-to: <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> 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" To: "L.C. Karssen" Cc: emacs-orgmode@gnu.org I believe the need to use quotation marks around the style file name was removed at some point, and the manual is out of date. Instead of #+ODT_STYLES_FILE: "template.ott" the manual ought now to read: #+ODT_STYLES_FILE: template.ott Yours, Christian L.C. Karssen writes: > Hi list, > > Not sure if this is related (or fixed with the aforementioned patch) > because I'm not using a list for the ODT style file. > > Today, after upgrading from Org 9.1.13 (actually installed from melpa on > 20180625) to melpa version 20181105 exporting to ODT stopped working. In > my org file the style file name was enclosed in double quotes (as > specified in the manual [1]): > > #+ODT_STYLES_FILE: "template.ott" > > The error message is: > > OpenDocument export failed: Invalid specification of styles.xml file: > "\"template.ott\"" > > Removing the quotes fixes the export to ODT. > > > Best regards, > > Lennart. > > [1] https://orgmode.org/org.html#Applying-custom-styles > > > On 05-11-18 09:49, Christian Moe wrote: >> >> Thanks, Nicolas! >> >> I'll test on my end when it shows up in ELPA. >> >> Yours, >> Christian >> >> Nicolas Goaziou writes: >> >>> Hello, >>> >>> Christian Moe writes: >>> >>>> It seems the ODT exporter currently fails to read the ODT_STYLES_FILE >>>> option as a list, as in this example from the manual >>>> ([[info:org#Applying custom styles]]): >>>> >>>> #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")) >>>> >>>> This is needed if you want a complex style with e.g. an image in the >>>> header. >>>> >>>> Exporting this causes an "Invalid specification of styles.xml file" >>>> error on my recent ELPA version. The problem seems to be that the option >>>> is treated as a string and never tested to see if it contains a list. >>>> >>>> To reproduce the problem, place the attached documents >>>> odt-styles-test.org and odt-test-styles.odt in the same directory, then >>>> export odt-styles-test.org to ODT. The result should have a unicorn in >>>> the letterhead. >>>> >>>> The below quick-and-dirty patch seems to fix it, but I'm sure there's a >>>> better approach. >>> >>> Thank you. I applied your patch with an additional check: the value should >>> be enclosed within round brackets. >>> >>> Regards, >> >>