Re: [O] [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
Hello, "M. P. Ashton"writes: > Thanks for looking this over. Let me know what would be an acceptable > change if any. Applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
On 2016-03-04, M. P. Ashtonwrote: > I could make it unfill paragraphs, but I thought it might be useful > to preserve line breaks. > > [...] > > Thanks for looking this over. Let me know what would be an acceptable > change if any. I've switched to exporting my Org documents to markdown before including that in Confluence, so I'm not exactly maintaining ox-confluence much, but anything that brings added functionality is of course most welcome. Cheers, --Seb
Re: [O] [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
Hello -- On Thu, Mar 3, 2016, at 07:42 PM, Nicolas Goaziou wrote: > Hello, > > "M. P. Ashton"writes: > > > * contrib/lisp/ox-confluence.el: Do not generate filled paragraphs > > > > ox-confluence was generating filled paragraphs. Since Confluence treats > > each newline as a line break, this caused unexpected formatting. Added > > a paragraph function to generate unfilled paragraphs (taken from > > ox-md.el). > > --- > > contrib/lisp/ox-confluence.el | 7 +++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/contrib/lisp/ox-confluence.el > > b/contrib/lisp/ox-confluence.el > > index 9b96d5f..4304e5d 100644 > > --- a/contrib/lisp/ox-confluence.el > > +++ b/contrib/lisp/ox-confluence.el > > @@ -47,6 +47,7 @@ > > (italic . org-confluence-italic) > > (item . org-confluence-item) > > (link . org-confluence-link) > > + (paragraph . org-confluence-paragraph) > > (property-drawer . org-confluence-property-drawer) > > (section . org-confluence-section) > > (src-block . org-confluence-src-block) > > @@ -58,6 +59,12 @@ > > (underline . org-confluence-underline))) > > > > ;; All the functions we use > > +(defun org-confluence-paragraph (paragraph contents info) > > + "Transcode PARAGRAPH element for Confluence. > > +CONTENTS is the paragraph contents. INFO is a plist used as > > +a communication channel." > > + contents) > > This function doesn't unfill the paragraph. It merely returns it as it > was in the original Org document. You possibly want to call > `replace-regexp-in-string' and replace "\n" with " " in CONTENTS. That's true, but it isn't meant to unfill the paragraph: it is meant to stop the ASCII exporter from filling the paragraph. That is what was causing the problem. I could make it unfill paragraphs, but I thought it might be useful to preserve line breaks. > I'm Cc'ing the author since this is a contrib/ package. Thanks for looking this over. Let me know what would be an acceptable change if any. Best regards --Michael Ashton
Re: [O] [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
Hello, "M. P. Ashton"writes: > * contrib/lisp/ox-confluence.el: Do not generate filled paragraphs > > ox-confluence was generating filled paragraphs. Since Confluence treats > each newline as a line break, this caused unexpected formatting. Added > a paragraph function to generate unfilled paragraphs (taken from > ox-md.el). > --- > contrib/lisp/ox-confluence.el | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/contrib/lisp/ox-confluence.el > b/contrib/lisp/ox-confluence.el > index 9b96d5f..4304e5d 100644 > --- a/contrib/lisp/ox-confluence.el > +++ b/contrib/lisp/ox-confluence.el > @@ -47,6 +47,7 @@ > (italic . org-confluence-italic) > (item . org-confluence-item) > (link . org-confluence-link) > + (paragraph . org-confluence-paragraph) > (property-drawer . org-confluence-property-drawer) > (section . org-confluence-section) > (src-block . org-confluence-src-block) > @@ -58,6 +59,12 @@ > (underline . org-confluence-underline))) > > ;; All the functions we use > +(defun org-confluence-paragraph (paragraph contents info) > + "Transcode PARAGRAPH element for Confluence. > +CONTENTS is the paragraph contents. INFO is a plist used as > +a communication channel." > + contents) This function doesn't unfill the paragraph. It merely returns it as it was in the original Org document. You possibly want to call `replace-regexp-in-string' and replace "\n" with " " in CONTENTS. I'm Cc'ing the author since this is a contrib/ package. Regards, -- Nicolas Goaziou
[O] [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
* contrib/lisp/ox-confluence.el: Do not generate filled paragraphs ox-confluence was generating filled paragraphs. Since Confluence treats each newline as a line break, this caused unexpected formatting. Added a paragraph function to generate unfilled paragraphs (taken from ox-md.el). --- contrib/lisp/ox-confluence.el | 7 +++ 1 file changed, 7 insertions(+) diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el index 9b96d5f..4304e5d 100644 --- a/contrib/lisp/ox-confluence.el +++ b/contrib/lisp/ox-confluence.el @@ -47,6 +47,7 @@ (italic . org-confluence-italic) (item . org-confluence-item) (link . org-confluence-link) + (paragraph . org-confluence-paragraph) (property-drawer . org-confluence-property-drawer) (section . org-confluence-section) (src-block . org-confluence-src-block) @@ -58,6 +59,12 @@ (underline . org-confluence-underline))) ;; All the functions we use +(defun org-confluence-paragraph (paragraph contents info) + "Transcode PARAGRAPH element for Confluence. +CONTENTS is the paragraph contents. INFO is a plist used as +a communication channel." + contents) + (defun org-confluence-bold (bold contents info) (format "*%s*" contents)) -- (previous patch was cut off)