From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: allow live execution of code snippets in html export Date: Tue, 13 Dec 2016 17:11:31 +0100 Message-ID: <87mvfzzu4s.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGpgB-0003Zd-63 for emacs-orgmode@gnu.org; Tue, 13 Dec 2016 11:11:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGpg7-0007Mo-PX for emacs-orgmode@gnu.org; Tue, 13 Dec 2016 11:11:47 -0500 Received: from [195.159.176.226] (port=35888 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGpg7-0007MM-JF for emacs-orgmode@gnu.org; Tue, 13 Dec 2016 11:11:43 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cGpfx-0001hf-Dz for emacs-orgmode@gnu.org; Tue, 13 Dec 2016 17:11:33 +0100 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: emacs-orgmode@gnu.org 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:
function foo(name) {return "Hello " + name;} foo("Klipse");
It might be worth investigating whether you can just run Klipse on
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