emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lungang Fang <lungang.fang@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Fwd: [PATCH] Add support for ordered list to ox-confluence.el
Date: Thu, 8 Dec 2016 16:26:01 +1100	[thread overview]
Message-ID: <CAFfEE6Nhr7yRuCk3ScYOwFt4R66a=rdgGjrexTi4DnCFaagq8Q@mail.gmail.com> (raw)
In-Reply-To: <CAFfEE6M84WgMr1krBO_XqmbO68T9Yehy3zk2t-x0pUE5ejmTEw@mail.gmail.com>


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

Resend since the previous one seems lost.


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




-- 
Lungang Fang
Sydney, NSW 2153, Australia
M: +61 431 208 979 | E: lungang.fang@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 1725 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)


  reply	other threads:[~2016-12-08  5:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07  6:47 [PATCH] Add support for ordered list to ox-confluence.el Lungang Fang
2016-12-08  5:26 ` Lungang Fang [this message]
2016-12-08 22:49   ` Fwd: " 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

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='CAFfEE6Nhr7yRuCk3ScYOwFt4R66a=rdgGjrexTi4DnCFaagq8Q@mail.gmail.com' \
    --to=lungang.fang@gmail.com \
    --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).