From mboxrd@z Thu Jan 1 00:00:00 1970 From: "L.C. Karssen" Subject: Re: [BUG][ODT] ODT_STYLES_FILE not read as a list Date: Tue, 6 Nov 2018 16:18:48 +0100 Message-ID: <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> References: <8736snjh60.fsf@christianmoe.com> <87r2g08pn8.fsf@nicolasgoaziou.fr> <87a7mnewov.fsf@christianmoe.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W3Nq0IBmHXMfbnRmbRqGOTpXnZ47PaJZ9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK38G-0001OH-UP for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:19:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gK38C-0003Xo-TQ for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:19:08 -0500 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:47118) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gK38B-0003SV-Mj for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 10:19:04 -0500 In-Reply-To: <87a7mnewov.fsf@christianmoe.com> 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: emacs-orgmode@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --W3Nq0IBmHXMfbnRmbRqGOTpXnZ47PaJZ9 Content-Type: multipart/mixed; boundary="TWpg7XTuTAZ7YBuTViWxzLmGYs3SnnVH2"; protected-headers="v1" From: "L.C. Karssen" To: emacs-orgmode@gnu.org Message-ID: <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> Subject: Re: [O] [BUG][ODT] ODT_STYLES_FILE not read as a list References: <8736snjh60.fsf@christianmoe.com> <87r2g08pn8.fsf@nicolasgoaziou.fr> <87a7mnewov.fsf@christianmoe.com> In-Reply-To: <87a7mnewov.fsf@christianmoe.com> --TWpg7XTuTAZ7YBuTViWxzLmGYs3SnnVH2 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable 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: >=20 > Thanks, Nicolas! >=20 > I'll test on my end when it shows up in ELPA. >=20 > Yours, > Christian >=20 > Nicolas Goaziou writes: >=20 >> 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.pn= g")) >>> >>> 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 opt= ion >>> 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, th= en >>> export odt-styles-test.org to ODT. The result should have a unicorn i= n >>> 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 sh= ould >> be enclosed within round brackets. >> >> Regards, >=20 >=20 --=20 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* L.C. Karssen 's-Hertogenbosch The Netherlands lennart@karssen.org http://blog.karssen.org GPG key ID: A88F554A -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- --TWpg7XTuTAZ7YBuTViWxzLmGYs3SnnVH2-- --W3Nq0IBmHXMfbnRmbRqGOTpXnZ47PaJZ9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQQyBENSov4Y8H9uObIgAxQL2pzVCQUCW+Gw3QAKCRAgAxQL2pzV Cfa4AQCFIlotMk8moQgN5TYM+upQtaQUMEXeucwEiT3D4XvPRAD/RmmRNCtUHBij SR0r/qwGsrZPFf9A2H8818O0mg7Wx78= =iaIj -----END PGP SIGNATURE----- --W3Nq0IBmHXMfbnRmbRqGOTpXnZ47PaJZ9--