emacs-devel
[Top][All Lists]
Advanced

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

Re: Condition to link to javascript code?


From: Bastien Guerry
Subject: Re: Condition to link to javascript code?
Date: Sun, 18 Dec 2016 18:47:52 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0.50 (gnu/linux)

Hi Richard,

Richard Stallman <address@hidden> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > what are the conditions to link to a Javascript library within Emacs
>   > core code?
>
> How is such a thing even possible?

When a user exports an org-mode buffer to HTML, the HTML output can
contain links to external Javascript libraries.

We solved one of the problems by asking the author of the klipse
Javascript library to release it in a way that librejs accepts.

There is still the more general problem of linking to a library hosted
on Google's servers.

For example, the resulting HTML would contain these links:

https://storage.googleapis.com/app.klipse.tech/css/codemirror.css
https://storage.googleapis.com/app.klipse.tech/plugin_prod/js/klipse_plugin.min.js

Is it fine?

>   > We would like to let the org-mode HTML exporter use Klipse so that
>   > HTML exports of code blocks make them executable in the HTML output.
>
> I don't understand what it means for an Emacs Lisp program to
> "use Klipse".  Could you please explain the scenario in more
> detail?

Klipse is a Javascript library which allows to interpret a program
within a HTML page.

Take a simple Scheme sexp:

(+ 1 2)

When put within a HTML <code> tag:

<code>(+ 1 2)</code>

Then using klipse, this part of the HTML page becomes interactive.
You can edit it and evaluate it.

>   > 2. We need to use these links, which point to Google servers:
>
> That is no good; it is not right to direct users to visit a particular
> server, regardless of whose server it is -- whether it is Google, or
> the FSF, or yours, or mine.

This is not about *visiting* a server, it's about using a resource on
a server (in this case, the klipse.js library).

What do you suggest?

Asking users to download klipse.js and use it on their own servers?

It seems to me that the point of librejs is precisely to be able to
trust js code, even if it's not hosted on your server.

-- 
 Bastien



reply via email to

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