* [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
@ 2016-03-03 21:55 M. P. Ashton
2016-03-04 0:42 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: M. P. Ashton @ 2016-03-03 21:55 UTC (permalink / raw)
To: emacs-orgmode
* 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)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
2016-03-03 21:55 [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs M. P. Ashton
@ 2016-03-04 0:42 ` Nicolas Goaziou
2016-03-04 2:41 ` M. P. Ashton
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-03-04 0:42 UTC (permalink / raw)
To: M. P. Ashton; +Cc: Sébastien Delafond, emacs-orgmode
Hello,
"M. P. Ashton" <data@gtf.org> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
2016-03-04 0:42 ` Nicolas Goaziou
@ 2016-03-04 2:41 ` M. P. Ashton
2016-03-04 10:20 ` Sébastien Delafond
2016-03-16 21:37 ` Nicolas Goaziou
0 siblings, 2 replies; 5+ messages in thread
From: M. P. Ashton @ 2016-03-04 2:41 UTC (permalink / raw)
To: emacs-orgmode
Hello --
On Thu, Mar 3, 2016, at 07:42 PM, Nicolas Goaziou wrote:
> Hello,
>
> "M. P. Ashton" <data@gtf.org> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
2016-03-04 2:41 ` M. P. Ashton
@ 2016-03-04 10:20 ` Sébastien Delafond
2016-03-16 21:37 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Sébastien Delafond @ 2016-03-04 10:20 UTC (permalink / raw)
To: emacs-orgmode
On 2016-03-04, M. P. Ashton <data@gtf.org> wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
2016-03-04 2:41 ` M. P. Ashton
2016-03-04 10:20 ` Sébastien Delafond
@ 2016-03-16 21:37 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2016-03-16 21:37 UTC (permalink / raw)
To: M. P. Ashton; +Cc: emacs-orgmode
Hello,
"M. P. Ashton" <data@gtf.org> writes:
> Thanks for looking this over. Let me know what would be an acceptable
> change if any.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-16 21:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 21:55 [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs M. P. Ashton
2016-03-04 0:42 ` Nicolas Goaziou
2016-03-04 2:41 ` M. P. Ashton
2016-03-04 10:20 ` Sébastien Delafond
2016-03-16 21:37 ` Nicolas Goaziou
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).