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 17:15:42 +0100 Message-ID: <2fbfc24e-c356-831b-0e41-cca5a79de9c3@karssen.org> References: <8736snjh60.fsf@christianmoe.com> <87r2g08pn8.fsf@nicolasgoaziou.fr> <87a7mnewov.fsf@christianmoe.com> <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> <87r2fyxlpl.fsf@christianmoe.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CWyBXQSnJoSDJglZuADu1PpmAVvQk3kWD" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK41G-0007RL-GW for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 11:15:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gK419-0007ox-5n for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 11:15:58 -0500 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:51754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gK417-0007fK-K5 for emacs-orgmode@gnu.org; Tue, 06 Nov 2018 11:15:51 -0500 In-Reply-To: <87r2fyxlpl.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: Christian Moe Cc: emacs-orgmode@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CWyBXQSnJoSDJglZuADu1PpmAVvQk3kWD Content-Type: multipart/mixed; boundary="d2pNEjLL2qiRrJHuFkgbSpcAWpcLxGRTt"; protected-headers="v1" From: "L.C. Karssen" To: Christian Moe Cc: emacs-orgmode@gnu.org Message-ID: <2fbfc24e-c356-831b-0e41-cca5a79de9c3@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> <1fb5458b-43b7-e414-ce73-08d011339ccb@karssen.org> <87r2fyxlpl.fsf@christianmoe.com> In-Reply-To: <87r2fyxlpl.fsf@christianmoe.com> --d2pNEjLL2qiRrJHuFkgbSpcAWpcLxGRTt Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 06-11-18 16:35, Christian Moe wrote: >=20 > I believe the need to use quotation marks around the style file name wa= s > removed at some point I didn't know that. I had a quick look at the changes to ox-odt.el for the last few months, but it doesn't seem to be mentioned in any of the commit messages. Or was this a more global change? Does this also count for the regular #+INCLUDE: statement? I just tested it and for #+INCLUDE: it seems to work both with and without quotes (although the manual uses quotes). Best, Lennart. > , and the manual is out of date. Instead of >=20 > #+ODT_STYLES_FILE: "template.ott" >=20 > the manual ought now to read: >=20 > #+ODT_STYLES_FILE: template.ott >=20 > Yours, > Christian >=20 > L.C. Karssen writes: >=20 >> 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_FI= LE >>>>> 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 th= e >>>>> header. >>>>> >>>>> Exporting this causes an "Invalid specification of styles.xml file"= >>>>> error on my recent ELPA version. The problem seems to be that the o= ption >>>>> is treated as a string and never tested to see if it contains a lis= t. >>>>> >>>>> 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, >>> >>> --=20 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* L.C. Karssen 's-Hertogenbosch The Netherlands lennart@karssen.org http://blog.karssen.org GPG key ID: A88F554A -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- --d2pNEjLL2qiRrJHuFkgbSpcAWpcLxGRTt-- --CWyBXQSnJoSDJglZuADu1PpmAVvQk3kWD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQQyBENSov4Y8H9uObIgAxQL2pzVCQUCW+G+LgAKCRAgAxQL2pzV CbNoAP0U19wHPRQw3J+foLOD754/7RrZrKSdCm11R3uK9Ms3VAD6Atjlx19FhBg9 +X+D4eL2bFv7hS2j+/1Yp4RUPPOAzyo= =xhqJ -----END PGP SIGNATURE----- --CWyBXQSnJoSDJglZuADu1PpmAVvQk3kWD--