From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: allow live execution of code snippets in html export Date: Wed, 14 Dec 2016 12:55:29 -0500 Message-ID: References: <87mvfzzu4s.fsf@gmx.us> <877f72zux4.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11452568e5d6560543a20a8b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHDnV-0000bZ-3g for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 12:56:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHDnR-00060F-Rx for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 12:56:57 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:38429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHDnR-0005sJ-Mu for emacs-orgmode@gnu.org; Wed, 14 Dec 2016 12:56:53 -0500 Received: by mail-it0-f47.google.com with SMTP id j191so7025433ita.1 for ; Wed, 14 Dec 2016 09:56:30 -0800 (PST) In-Reply-To: <877f72zux4.fsf@gmx.us> 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: Rasmus Cc: bzg@bzg.fr, Yehonathan Sharvit , Org Mode --001a11452568e5d6560543a20a8b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Dec 14, 2016 at 5:06 AM, Rasmus wrote: > Hi all, > > >> 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. > >> > > I think that should be pretty straighforward. > > Yeah, the link in Bastien's twitter post shows there's already a setting > for it > > > > I don=E2=80=99t know if much more support is needed. We add some automat= ic > configuration scripting or add a per-block switch for enabling klipse. > > Two more little things. HTML blocks can't use the standard editor so they need an extra attribute `data-editor-style=3D"html"` Also, Klipse supports including comma-separated external scripts to the execution environment with the `data-external-libs` attribute I have been using #+ATTR_HTML :code_attribs data-external-libs=3D" http://jquery.org/jquery.js,./lib/01.js". I'm doing it in tandem with the :tangle header, exporting previous code snippets and adding them to the execution environment as I go (just for fun). I don't know if there's a better way to do this, potentially maybe trying to partially co-ordinate the execution environments for klipse and org so that executing code in org and in the html export gives similar results. Seems a little ambitious. Also, it would be nice if klipse had an elisp REPL since so many org users blog about elisp. > >> The Klipse license is GPL3. > >> > > > > Is org GPL2 or GPL3? Are there any compatibility issues between the two= ? > > No, it was meant as a compliment of a sort. > :-) --001a11452568e5d6560543a20a8b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Dec 14, 2016 at 5:06 AM, Rasmus <rasmus@gmx.us> wr= ote:
Hi all,

>> 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.
>>
> I think that should be pretty straighforward.

Yeah, the link in Bastien's twitter post shows there's alrea= dy a setting
for it

=C2=A0 =C2=A0 <script type=3D"text/javascript">window.= klipse_settings =3D {selector: '.src-clojure'};</script>

I don=E2=80=99t know if much more support is needed.=C2=A0 We add some auto= matic
configuration scripting or add a per-block switch for enabling klipse.

Two more little things. HTML = blocks can't use the standard editor so they need an extra attribute `d= ata-editor-style=3D"html"`

Also, Klipse support= s including comma-separated external scripts to the execution environment w= ith the `data-external-libs` attribute

I have been using =
#+ATTR_HTML :code_attribs data-external-libs=3D"http://jquery.org/jquery.js,./= lib/01.js".=C2=A0 I'm doing it in tandem with the :tangle head= er, exporting previous code snippets and adding them to the execution envir= onment as I go (just for fun).=C2=A0 I don't know if there's a bett= er way to do this, potentially maybe trying to partially co-ordinate the ex= ecution environments for klipse and org so that executing code in org and i= n the html export gives similar results.=C2=A0 Seems a little ambitious.=C2= =A0

Also, it would be nice if klipse had an elisp REPL s= ince so many org users blog about elisp.=C2=A0

=C2=A0
>> The Klipse license is GPL3.
>>
>
> Is org GPL2 or GPL3? Are there any compatibility issues between the tw= o?

No, it was meant as a compliment of a sort.
:-)
--001a11452568e5d6560543a20a8b--