Re: [O] [PATCH] Add support for ordered list to ox-confluence.el
Hello, Charles Durst writes: > 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 Applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Add support for ordered list to ox-confluence.el
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 > >
Re: [O] [PATCH] Add support for ordered list to ox-confluence.el
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 >
Re: [O] [PATCH] Add support for ordered list to ox-confluence.el
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
Re: [O] [PATCH] Add support for ordered list to ox-confluence.el
Great! Then, what about using my patch ? It would be my first patch adopted by any open source project, a real milestone :) On Friday, December 9, 2016, Charles Durst wrote: > I have tried the results of both versions and loaded them into the > Confluence Wiki, and Lungang is correct, from what I can tell, they > both will work. > > So I don't really care which one you choose either. I just needed the > functionality. > -- > Charles Durst > cwdurst+orgm...@gmail.com > > On Thu, Dec 8, 2016 at 9:32 PM, Lungang Fang > wrote: > > Hi Charles and Nicholas, > > > > My code also supports nested mixed lists but is simpler. I mean, my code > > will convert the list given by Charles to > > > > # Here > > -- is > > -- an > > # example > > -- of > > -- a > > # mixed > > # list > > > > Although this format is not mentioned in confluence wiki, it is > supported by > > conflucence according to my test (in Jira). > > > > So, in my opinion, it is a matter of personal preference: more > complicated > > code complies with documented interface, or simpler code that exploits > > undocumented feature. > > > > I prefer my code. But you guys feel free to make decision. I am OK with > > whatever you choose. > > > > Cheers, > > Lungang > > > > On Fri, Dec 9, 2016 at 10:37 AM, Charles Durst < > cwdurst+orgm...@gmail.com > > > wrote: > >> > >> They do conflict. My version is slightly more complicated since it > >> also supports nested mixed lists. > >> > >> For example: > >> > >> 1. Here > >>* is > >>* an > >> 2. example > >>* of > >>* a > >> 3. mixed > >> 4. list > >> > >> Which translates to: > >> > >> # Here > >> #- is > >> #- an > >> # example > >> #- of > >> #- a > >> # mixed > >> # list > >> > >> Which is effectively the same as the example in the Confluence > >> documentation: > >> > >> https://confluence.atlassian.com/confcloud/confluence-wiki- > markup-724765099.html#ConfluenceWikiMarkup-Mixedlists > >> > >> -- > >> Charles Durst > >> cwdurst+orgm...@gmail.com > >> > >> > >> On Thu, Dec 8, 2016 at 5:49 PM, Nicolas Goaziou > > >> wrote: > >> > Hello, > >> > > >> > Lungang Fang > writes: > >> > > >> >> 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. > >> > > >> > Thank you. > >> > > >> > However, this somewhat conflicts with a patch recently sent on the ML, > >> > but not yet applied, by Charles Durst (Cc'ed). > >> > > >> > Could one double-check if one doesn't supersede the other, or if they > >> > could be merged (although I suspect the former) and report back so > >> > I know what patch to apply? > >> > > >> > Regards, > >> > > >> > -- > >> > Nicolas Goaziou > > > > >
[O] [PATCH] Add support for ordered list to ox-confluence.el
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 0001-ox-confluence.el-Add-support-for-ordered-list.patch Description: Binary data