From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lungang Fang Subject: [PATCH] ox-confluence.el: Add support for ordered list Date: Thu, 8 Dec 2016 16:35:26 +1100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1143b2a62e82a305431f010d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cErNe-0003lo-JJ for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 00:36:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cErNb-0006Wf-He for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 00:36:30 -0500 Received: from mail-qt0-f171.google.com ([209.85.216.171]:35646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cErNb-0006WP-CX for emacs-orgmode@gnu.org; Thu, 08 Dec 2016 00:36:27 -0500 Received: by mail-qt0-f171.google.com with SMTP id c47so402897281qtc.2 for ; Wed, 07 Dec 2016 21:36:27 -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" To: emacs-orgmode@gnu.org --001a1143b2a62e82a305431f010d Content-Type: text/plain; charset=UTF-8 Hi there, This is a patch for contrib/lisp/ox-confluence.el generated following instructions on http://orgmode.org/worg/org-contribute.html#patches . It adds support for ordered list. -- Lungang Fang * contrib/lisp/ox-confluence.el (org-confluence-item): Support ordered list When converting a bullet item, examine the type of it and convert accordingly. TINYCHANGE --- contrib/lisp/ox-confluence.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el index 5de9e0f..de8b00e 100644 --- a/contrib/lisp/ox-confluence.el +++ b/contrib/lisp/ox-confluence.el @@ -81,9 +81,12 @@ (format "_%s_" contents)) (defun org-confluence-item (item contents info) - (concat (make-string (1+ (org-confluence--li-depth item)) ?\-) - " " - (org-trim contents))) + (let* ((plain-list (org-export-get-parent item)) + (type (org-element-property :type plain-list)) + (bullet (if (eq type `ordered) ?\# ?\-))) + (concat (make-string (1+ (org-confluence--li-depth item)) bullet) + " " + (org-trim contents)))) (defun org-confluence-fixed-width (fixed-width contents info) (format "\{\{%s\}\}" contents)) -- 2.9.3 (Apple Git-75) --001a1143b2a62e82a305431f010d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi there,

This is=C2=A0a patch for=C2=A0contrib/lisp/ox-confluence.el generated following instructions on=C2=A0http://orgmode.org/worg/org-contribute.html#patches=C2=A0.=C2=A0It adds support for ordered lis= t.

--
Lungang Fang


*= contrib/lisp/ox-confluence.el (org-confluence-item): Support ordered
=
list

When converting a bull= et item, examine the type of it and convert
accordingly.

<= div style=3D"word-wrap:break-word">TINYCHANGE
---
=C2=A0contrib/lisp= /ox-confluence.el | 9 ++++++---
= =C2=A01 file changed, 6 insertions(+), 3 deletions(-)

diff --gi= t a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el
index 5de9e0f..de8b00e 100644
--- a/contrib/lisp/ox-confluence.el
+++ b/contrib/lisp/ox-confluence.el
@@ -81,9 +81,12 @@
=C2=A0 =C2=A0(format "_%s_" contents))
=C2=A0
=C2=A0(defun org-confluence-item (item contents info)
- =C2=A0(concat (make-string (1+ (org-confluence-= -li-depth item)) ?\-)
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0" "
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-trim contents)))
+ =C2=A0(let* ((plain-list (org-export-get-pare= nt item))
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (type (org-element-property :type plain-list))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bullet (if (eq type `ord= ered) ?\# ?\-)))
+ =C2=A0 =C2=A0(c= oncat (make-string (1+ (org-confluence--li-depth item)) bullet)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&q= uot; "
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(org-trim contents))))
=C2=A0
=C2=A0(defun org-= confluence-fixed-width (fixed-width contents info)
=C2=A0 =C2=A0(format "\{\{%s\}\}" contents))
--=C2=A0
2.9.3 (Apple Git-75)
--001a1143b2a62e82a305431f010d--