Re: [O] [PATCH] allow klipse export in html

2017-03-29 Thread Yehonathan Sharvit
Good news. Where is the commit?

On Fri, Mar 24, 2017, 14:15 Matt Price  wrote:

> Yay! Thank you!
>
> On Mar 23, 2017 6:25 PM, "Bastien Guerry"  wrote:
>
> Hi Matt,
>
> I finally committed this.  Sorry it took so long and thanks
> again for the patch!
>
> Best,
>
> --
>  Bastien
>
>


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

2016-12-17 Thread Yehonathan Sharvit
Done

On Thu, 15 Dec 2016 at 22:55 Yehonathan Sharvit <vie...@gmail.com> wrote:

> On Thu, Dec 15, 2016 at 5:50 PM, Matt Price <mopto...@gmail.com> wrote:
>
>
>
> On Thu, Dec 15, 2016 at 5:07 AM, Bastien <b...@gnu.org> wrote:
>
> Hi Matt,
>
> Matt Price <mopto...@gmail.com> 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.
>
> The new patch in that other thread does this.
>
>
> > - 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.
>
>
>
> > 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.
> > Since Yehonathan is here on this thread and enthusiastic about
> > helping out: is there something he could do to make this feasible for
> > us?  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.
>
>
> I think you just have to add two lines to non-minified scripts, and one
> more to minified scripts:
>
> https://www.gnu.org/software/librejs/free-your-javascript.html#magnet-link-license
>
> Yehonathan, would you bewilling to do this?
>
> ​Sure. Will do it tomorrow.​
>
>
>
>
>
> --
>  Bastien
>
>
>
>


Re: [O] [PATCH] allow klipse export in html

2016-12-15 Thread Yehonathan Sharvit
On Thu, Dec 15, 2016 at 5:35 PM, Bastien Guerry  wrote:

> Hi Matt,
>
> thanks for the new patch!
>
> Before applying it (and working further on it), I suggest we wait for
> Yehonathan's feedback on making klipse.js librejs-compatible.  That's
> possibly a blocking issue, and we need to sort it out.
>
> ​I've added license info to make klipse.js librejs-compatible: both
mininified and non minified versions.

What else do you need from me?

​


> Thanks!
>
> --
>  Bastien
>


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

2016-12-15 Thread Yehonathan Sharvit
On Thu, Dec 15, 2016 at 5:50 PM, Matt Price  wrote:

>
>
> On Thu, Dec 15, 2016 at 5:07 AM, Bastien  wrote:
>
>> 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.
>>
>> The new patch in that other thread does this.
>
>
>> > - 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.
>>
>
>
>> > 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.
>> > Since Yehonathan is here on this thread and enthusiastic about
>> > helping out: is there something he could do to make this feasible for
>> > us?  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.
>>
>
> I think you just have to add two lines to non-minified scripts, and one
> more to minified scripts:
> https://www.gnu.org/software/librejs/free-your-javascript.
> html#magnet-link-license
>
> Yehonathan, would you bewilling to do this?
>
​Sure. Will do it tomorrow.​


>
>
>
>> --
>>  Bastien
>>
>
>


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

2016-12-14 Thread Yehonathan Sharvit
On Wed, 14 Dec 2016 at 19:55 Matt Price  wrote:

> 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
>
> window.klipse_settings = {selector:
> '.src-clojure'};
>
> I don’t know if much more support is needed.  We add some automatic
> 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="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="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.
>

​For that, one needs to find (or to write) an elisp evaluation in
javascript.​


>
>
>
> >> 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.
>
>
> :-)
>