emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Paul Schorfheide <pschorf2@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Patch for ox-confluence.el
Date: Thu, 17 Mar 2016 12:26:03 +0100	[thread overview]
Message-ID: <87zitxmjlg.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CADK98M2GKNNSY0y_27MukDD=u_Kp+44RMzpABuDowsHgMvfLUA@mail.gmail.com> (Paul Schorfheide's message of "Wed, 09 Mar 2016 16:42:33 +0000")

Hello,

Paul Schorfheide <pschorf2@gmail.com> 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))

Nitpick:

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

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-03-17 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 16:42 Patch for ox-confluence.el Paul Schorfheide
2016-03-17 11:26 ` Nicolas Goaziou [this message]
2016-03-19 14:27   ` Paul Schorfheide
2016-04-02  8:57     ` 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=87zitxmjlg.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=pschorf2@gmail.com \
    /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).