emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Add support for ordered list to ox-confluence.el
@ 2016-12-07  6:47 Lungang Fang
  2016-12-08  5:26 ` Fwd: " Lungang Fang
  0 siblings, 1 reply; 12+ messages in thread
From: Lungang Fang @ 2016-12-07  6:47 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 421 bytes --]

Hi there,

Attached 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.

I didn't find where I should send this patch. Hopefully, this is the
correct email list for patch request. If it is not, could anyone please
tell me the correct way to submit a patch request to org-mode?

Regards,
-- 
Lungang Fang

[-- Attachment #1.2: Type: text/html, Size: 946 bytes --]

[-- Attachment #2: 0001-ox-confluence.el-Add-support-for-ordered-list.patch --]
[-- Type: application/octet-stream, Size: 1285 bytes --]

From 1cef0cda8f975eda3adc4c46614aad2097ba2baf Mon Sep 17 00:00:00 2001
From: Lungang Fang <lungang.fang@gmail.com>
Date: Wed, 7 Dec 2016 17:26:04 +1100
Subject: [PATCH] ox-confluence.el: Add support for ordered list

* 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)


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-12-13 12:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07  6:47 [PATCH] Add support for ordered list to ox-confluence.el Lungang Fang
2016-12-08  5:26 ` Fwd: " Lungang Fang
2016-12-08 22:49   ` Nicolas Goaziou
2016-12-08 23:35     ` Charles Durst
2016-12-08 23:37     ` Charles Durst
2016-12-09  2:32       ` Lungang Fang
2016-12-09  3:39         ` Charles Durst
2016-12-09  8:34           ` Lungang Fang
2016-12-09 20:34             ` Nicolas Goaziou
2016-12-10  7:54               ` Lungang Fang
2016-12-12 23:07                 ` Charles Durst
2016-12-13 12:50                   ` Nicolas Goaziou

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).