emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] allow live execution of code snippets in html export


From: Rasmus
Subject: Re: [O] allow live execution of code snippets in html export
Date: Tue, 13 Dec 2016 17:11:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Hi Matt,

> In other threads I've been describing a method to allow live code snippets
> to be embedded in reveal.js export, using klipse (
> https://github.com/viebel/klipse).  I have to say it feels somewhat
> transformative to me, and I wonder if it would be worth integrating into
> ox-html.  I'd be happy to hack together a patch but I wanted to ask if
> anyone else likes the idea.  The great thing about putting it into ox-html
> instead of building a derived mode is that the other derived mode would
> potentially inherit the functionality directly.

I like it.  The clearest example seems to be this one:

      https://jsfiddle.net/viebel/50oLnykk/

Some observations follow:

The syntax for Klipse source blocks is nice and simple:

    <div class="klipse">
     function foo(name) {return "Hello " + name;}
     foo("Klipse");
    </div>

It might be worth investigating whether you can just run Klipse on <pre>
blocks as that would potentially make it backward compatible.
Potentially, an extension to Klipse that recognizes Org src blocks (in
html) might be nice.

The Klipse license is GPL3.

The README recommends to get the files from googleapis.com.  I’m not sure
we would want to generate html files that get stuff from Google.  Then
again, maybe googleapis.com is perfectly OK...

It could easily become a mess in complex cases, e.g. if your Python code
blocks use Pandas, which does not seem to be supported by Skulpt.

Nonetheless, Klipse looks intriguing.  I think it could be great if you
look further into it.

Thanks,
Rasmus

-- 
Dung makes an excellent fertilizer




reply via email to

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