From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: allow live execution of code snippets in html export Date: Thu, 15 Dec 2016 11:07:13 +0100 Message-ID: <87d1gtfqum.fsf@bzg.fr> References: <87mvfzzu4s.fsf@gmx.us> <877f72zux4.fsf@gmx.us> <87d1gukd9y.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHSwy-0003Qa-LM for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 05:07:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHSwv-0006wk-HS for emacs-orgmode@gnu.org; Thu, 15 Dec 2016 05:07:44 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matt Price Cc: Yehonathan Sharvit , Org Mode , Rasmus Hi Matt, Matt Price writes: > Would we need a switch to permit the old syntax for people with > complex setups who don't want to change? Yes. We need to be more careful on being backward compatible. > - make src-clojure in
 customizable
>     ?
>
> Is this likely to break anything in derived exporters? It would
> certianly be convenient e.g for using highlight.js in wordpress in
> similar environments.

Yes.

>     - have ob-javascript.el to let ox-html know how to export js
>     code ?
>
> Isn't this in org already? there's an ob-js.el in my org repo.

Yep, indeed -- I have just this in my emacs.el for inline js:

(add-to-list 'org-src-lang-modes '("inline-js" . javascript))
(defvar org-babel-default-header-args:inline-js
  '((:results . "html")
    (:exports . "results")))
(defun org-babel-execute:inline-js (body _params)
  (format "" body))

Maybe this could be made available too.

>     - have org-html-js to easily allow adding js libraries at the
>     bottom of a page? Perhaps together with #+html_js and
>     #+html_js_extra ?
>
> This seems like a good idea and pretty easy.

I will think more about this.

> I odn't really quite understand the problem and solution parameters.=C2=A0
> Since Yehonathan is here on this thread and enthusiastic about
> helping out: is there something he could do to make this feasible for
> us?=C2=A0 Or by "more general mechanism" do you mean some third way
> between bundling and linking to?

One way to solve this on Yehonathan's side is to update klipse.js and
follow the instruction on librejs on how to make librejs accept the js
code as "safe":

https://www.gnu.org/software/librejs/free-your-javascript.html

I don't know how much work is involved in this, though.

--=20
 Bastien