[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Patch for ox-confluence.el

From: Paul Schorfheide
Subject: Re: [O] Patch for ox-confluence.el
Date: Sat, 19 Mar 2016 14:27:35 +0000

Thanks for the feedback, Nicolas. I wasn't familiar with defcustom. I made the two edits and attached an updated patch. I would be happy to maintain the file in org-mode for now and look into moving it into ELPA.

Paul Schorfheide

On Thu, Mar 17, 2016 at 6:23 AM Nicolas Goaziou <address@hidden> wrote:

Paul Schorfheide <address@hidden> writes:

> I made a small change to ox-confluence.el to support additional language
> name mappings. Can someone please review it?

Thank you for the patch.

AFAIU, "ox-confluence.el" doesn't have a maintainer anymore, in case you
feel like doing the job.

The library could also be moved to ELPA, IMO.

> +(defvar org-confluence-lang-alist
> +  '(("sh" . "bash"))
> +  "Map from org-babel language name to confluence wiki language name")

What about making it a defcustom?

>  ;; All the functions we use
>  (defun org-confluence-bold (bold contents info)
>    (format "*%s*" contents))
> @@ -111,8 +115,9 @@
>  (defun org-confluence-src-block (src-block contents info)
>    ;; FIXME: provide a user-controlled variable for theme
>    (let* ((lang (org-element-property :language src-block))
> -         (language (if (string= lang "sh") "bash" ;; FIXME: provide a mapping of some sort
> -                     lang))
> +         (language (if (assoc lang org-confluence-lang-alist)
> +                    (cdr (assoc lang org-confluence-lang-alist))
> +                       lang))


  (or (cdr (assoc lang org-confluence-lang-alist) lang))


Nicolas Goaziou

Attachment: 0001-Add-org-confluence-lang-alist.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]