emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Mark A. Hershberger" <mah@everybody.org>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: ox-odt.el should support text:start-value [9.1.14 (9.1.14-7-g01c419-elpaplus @ …/org-plus-contrib-20181015/)]
Date: Fri, 19 Oct 2018 09:45:47 -0400	[thread overview]
Message-ID: <874ldiaw38.fsf@everybody.org> (raw)
In-Reply-To: <87va5y6gpd.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 19 Oct 2018 00:19:26 +0200")

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Could you provide a patch using git format-patch, with a proper commit
> message?

Attached.  Also see
<https://code.orgmode.org/hexmode/org-mode/commit/91cb08df2473c70b7817c37ae0744e051964ad07>.

> Also, if you haven't signed FSF papers, please add TINYCHANGE at the
> end of the commit message.

I have signed papers on file.

Mark.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-support-for-text-start-value-to-ox-odt.el.patch --]
[-- Type: text/x-diff, Size: 1294 bytes --]

From 91cb08df2473c70b7817c37ae0744e051964ad07 Mon Sep 17 00:00:00 2001
From: "Mark A. Hershberger" <mah@nichework.com>
Date: Fri, 19 Oct 2018 09:19:38 -0400
Subject: [PATCH] Add support for text:start-value to ox-odt.el

ODF supports starting lists at a set number via text:start-value.
Without this, ODF files just restart numbering when they should
continue with the specified number.
---
 lisp/ox-odt.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 70ef9de2e..b9a81f74d 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1966,10 +1966,13 @@ contextual information."
 CONTENTS holds the contents of the item.  INFO is a plist holding
 contextual information."
   (let* ((plain-list (org-export-get-parent item))
+	 (count (org-element-property :counter item))
 	 (type (org-element-property :type plain-list)))
     (unless (memq type '(ordered unordered descriptive-1 descriptive-2))
       (error "Unknown list type: %S" type))
-    (format "\n<text:list-item>\n%s\n%s"
+    (format (concat "\n<text:list-item"
+		    (when count (concat (format " text:start-value=\"%s\"" count)))
+		    ">\n%s\n%s")
 	    contents
 	    (if (org-element-map item 'table #'identity info 'first-match)
 		"</text:list-header>"
-- 
2.19.1


  reply	other threads:[~2018-10-19 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  2:23 Bug: ox-odt.el should support text:start-value [9.1.14 (9.1.14-7-g01c419-elpaplus @ …/org-plus-contrib-20181015/)] Mark A. Hershberger
2018-10-18 22:19 ` Nicolas Goaziou
2018-10-19 13:45   ` Mark A. Hershberger [this message]
2018-10-20  8:13     ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2018-10-18  1:21 Mark A. Hershberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ldiaw38.fsf@everybody.org \
    --to=mah@everybody.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).