emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Durst <cwdurst+orgmode@gmail.com>
To: Lungang Fang <lungang.fang@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add support for ordered list to ox-confluence.el
Date: Mon, 12 Dec 2016 18:07:50 -0500	[thread overview]
Message-ID: <CAM4wePg=MaYsTznaZROx5i1n-=mTexwa7YfWEV7ZMa9EaLBqNQ@mail.gmail.com> (raw)
In-Reply-To: <CAFfEE6O6-HBZZUVJ+0OxDXgWFd42cZiiGUXUdyTP-so06cZokg@mail.gmail.com>

Oops, I just realized an important difference.  My version also
supported descriptive lists.  The version with only Nicholas' changes
will lose the item name:

* item-name :: description

Will just become

- description

Here is a fix based on Nicholas' version:


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

When converting a descriptive list item, be sure to include the "item"
part, not just the description.

TINYCHANGE
---
 contrib/lisp/ox-confluence.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el
index de8b00e..a1318f9 100644
--- a/contrib/lisp/ox-confluence.el
+++ b/contrib/lisp/ox-confluence.el
@@ -83,9 +83,13 @@
 (defun org-confluence-item (item contents info)
   (let* ((plain-list (org-export-get-parent item))
          (type (org-element-property :type plain-list))
-         (bullet (if (eq type `ordered) ?\# ?\-)))
+         (bullet (if (eq type 'ordered) ?\# ?\-)))
     (concat (make-string (1+ (org-confluence--li-depth item)) bullet)
             " "
+    (if (eq type 'descriptive)
+ (concat "*"
+ (org-export-data (org-element-property :tag item) info)
+ "* - "))
             (org-trim contents))))

 (defun org-confluence-fixed-width (fixed-width contents info)
-- 
2.5.4 (Apple Git-61)


On Sat, Dec 10, 2016 at 2:54 AM, Lungang Fang <lungang.fang@gmail.com> wrote:
> Hi Nicolas and Charles,
>
> Thank you both.
>
> Lungang
>
> On Sat, Dec 10, 2016 at 7:34 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
>>
>> Hello,
>>
>> Lungang Fang <lungang.fang@gmail.com> writes:
>>
>> > Great! Then, what about using my patch ? It would be my first patch
>> > adopted
>> > by any open source project, a real milestone  :)
>>
>> Applied. Thanks to both of you.
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>
>

  reply	other threads:[~2016-12-12 23:09 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 ` 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 [this message]
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='CAM4wePg=MaYsTznaZROx5i1n-=mTexwa7YfWEV7ZMa9EaLBqNQ@mail.gmail.com' \
    --to=cwdurst+orgmode@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=lungang.fang@gmail.com \
    /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).