emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "M. P. Ashton" <data@gtf.org>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] (fixed) ox-confluence.el: Do not generate filled paragraphs
Date: Thu, 03 Mar 2016 21:41:21 -0500	[thread overview]
Message-ID: <1457059281.3939895.539188402.04FF3C69@webmail.messagingengine.com> (raw)
In-Reply-To: <87d1rbvzsu.fsf@nicolasgoaziou.fr>

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

  reply	other threads:[~2016-03-04  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-03-04 10:20     ` Sébastien Delafond
2016-03-16 21:37     ` 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=1457059281.3939895.539188402.04FF3C69@webmail.messagingengine.com \
    --to=data@gtf.org \
    --cc=emacs-orgmode@gnu.org \
    /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).