From mboxrd@z Thu Jan 1 00:00:00 1970 From: Derek Feichtinger Subject: Bug: odt table exporter bug with rel-width [8.2.1 (8.2.1-30-g757f00-elpaplus @ /home/dfeich/.emacs.d/elpa/org-plus-contrib-20131104/)] Date: Mon, 4 Nov 2013 22:40:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf302234d5f242ef04ea60c4a7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdRtD-00007A-67 for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 16:40:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdRtC-00070b-1l for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 16:40:51 -0500 Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]:59953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdRtB-00070V-Qo for emacs-orgmode@gnu.org; Mon, 04 Nov 2013 16:40:49 -0500 Received: by mail-ie0-f178.google.com with SMTP id x13so13459191ief.37 for ; Mon, 04 Nov 2013 13:40:48 -0800 (PST) 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 --20cf302234d5f242ef04ea60c4a7 Content-Type: text/plain; charset=ISO-8859-1 Dear developers When exporting a document containing a table and using the :rel-width modifier (as documented in [info:org#Tables in ODT export]), an error is returned: #+ATTR_ODT: :rel-width 50 | Area/Month | Jan | Feb | Mar | Sum | |---------------+-------+-------+-------+-------| | / | < | | | < | | | | | | | | North America | 1 | 21 | 926 | 948 | | Middle East | 6 | 75 | 844 | 925 | | Asia Pacific | 9 | 27 | 790 | 826 | |---------------+-------+-------+-------+-------| | Sum | 16 | 123 | 2560 | 2699 | OpenDocument export failed: Format specifier doesn't match argument type Reason is that the plist-get in line 1458 of ox-odt.el returns a string reprensentation "50" of the :rel-width number, but the org-odt-table-style-format variable contains a %d conversion string for this parameter. (loop for (style-name props) in (plist-get org-odt-automatic-styles 'Table) do (when (setq props (or (plist-get props :rel-width) 96)) (insert (format org-odt-table-style-format style-name props)))) Either the conversion string should be changed to a %s or the plist-get obtained value should get converted to a string. Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-10-03 on hamsa, modified by Debian Package: Org-mode version 8.2.1 (8.2.1-30-g757f00-elpaplus @ /home/dfeich/.emacs.d/elpa/org-plus-contrib-20131104/) Best regards Derek --20cf302234d5f242ef04ea60c4a7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear developers

When exporti= ng a document containing a table and using the :rel-width
modifie= r (as documented in [info:org#Tables in ODT export]), an error is returned:=

=A0 =A0 =A0#+ATTR_ODT: :rel-width 50
=A0 =A0 = =A0| Area/Month =A0 =A0| =A0 Jan | =A0 Feb | =A0 Mar | =A0 Sum |
= =A0 =A0 =A0|---------------+-------+-------+-------+-------|
=A0 = =A0 =A0| / =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 < | =A0 =A0 =A0 | =A0 =A0 = =A0 | =A0 =A0 < |
=A0 =A0 =A0| <l13> =A0 =A0 =A0 =A0 | =A0<r5> | =A0<r5&g= t; | =A0<r5> | =A0<r6> |
=A0 =A0 =A0| North America |= =A0 =A0 1 | =A0 =A021 | =A0 926 | =A0 948 |
=A0 =A0 =A0| Middle = East =A0 | =A0 =A0 6 | =A0 =A075 | =A0 844 | =A0 925 |
=A0 =A0 =A0| Asia Pacific =A0| =A0 =A0 9 | =A0 =A027 | =A0 790 | =A0 8= 26 |
=A0 =A0 =A0|---------------+-------+-------+-------+-------|=
=A0 =A0 =A0| Sum =A0 =A0 =A0 =A0 =A0 | =A0 =A016 | =A0 123 | =A0= 2560 | =A02699 |

OpenDocument export failed: Forma= t specifier doesn't match argument type

Reason is that the plist-get in line 1458 of ox-odt.el = returns a string
reprensentation "50" of the :rel-width= number, but the org-odt-table-style-format
variable contains a %= d conversion string for this parameter.

=A0 =A0 =A0 (loop for (style-name props) in
<= span class=3D"" style=3D"white-space:pre"> =A0 =A0(plist-get org-od= t-automatic-styles 'Table) do
=A0 =A0(when (setq props (or (plist-get props :rel-wid= th) 96))
=A0 =A0 =A0(insert= (format org-odt-table-style-format style-name props))))

Either the conversion string should be changed to a %s or the plist-= get
obtained value should get converted to a string.

<= div>Emacs =A0: GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2)
=A0of 2013-10-03 on hamsa, modified by Debian
Package: Org= -mode version 8.2.1 (8.2.1-30-g757f00-elpaplus @ /home/dfeich/.emacs.d/elpa= /org-plus-contrib-20131104/)

Best regards
Derek

--20cf302234d5f242ef04ea60c4a7--