From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Durst Subject: Re: [PATCH] Add support for ordered list to ox-confluence.el Date: Mon, 12 Dec 2016 18:07:50 -0500 Message-ID: References: <87pol2f34e.fsf@nicolasgoaziou.fr> <87wpf8et8v.fsf@nicolasgoaziou.fr> Reply-To: cwdurst+orgmode@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGZiz-0007kL-5H for emacs-orgmode@gnu.org; Mon, 12 Dec 2016 18:09:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGZiv-00029u-W4 for emacs-orgmode@gnu.org; Mon, 12 Dec 2016 18:09:37 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:36799) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGZiv-00024L-Q5 for emacs-orgmode@gnu.org; Mon, 12 Dec 2016 18:09:33 -0500 Received: by mail-qt0-f196.google.com with SMTP id n34so11780573qtb.3 for ; Mon, 12 Dec 2016 15:09:11 -0800 (PST) In-Reply-To: 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: Lungang Fang Cc: emacs-orgmode@gnu.org 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 wrote: > Hi Nicolas and Charles, > > Thank you both. > > Lungang > > On Sat, Dec 10, 2016 at 7:34 AM, Nicolas Goaziou > wrote: >> >> Hello, >> >> Lungang Fang 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 > >