Nicolas Goaziou <[email protected]> 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.
>From 91cb08df2473c70b7817c37ae0744e051964ad07 Mon Sep 17 00:00:00 2001
From: "Mark A. Hershberger" <[email protected]>
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 via email to