unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@gnu.org>
To: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Condition to link to javascript code?
Date: Sun, 18 Dec 2016 18:47:52 +0100	[thread overview]
Message-ID: <87pokpnn7b.fsf@bzg.fr> (raw)
In-Reply-To: <E1cIHD4-0005EK-Hw@fencepost.gnu.org> (Richard Stallman's message of "Sat, 17 Dec 2016 10:47:42 -0500")

Hi Richard,

Richard Stallman <rms@gnu.org> 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	other threads:[~2016-12-18 17:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  3:01 Condition to link to javascript code? Bastien
2016-12-15  3:41 ` Clément Pit--Claudel
2016-12-15 12:12   ` Bastien
2016-12-17 15:47 ` Richard Stallman
2016-12-18 17:47   ` Bastien Guerry [this message]
2016-12-19  7:20     ` Elias Mårtenson
2016-12-19  8:06       ` Bastien Guerry
2016-12-19  8:46         ` Elias Mårtenson
2016-12-19 16:32           ` Bastien Guerry
2016-12-19 16:52             ` Clément Pit--Claudel
2016-12-20 18:15             ` Richard Stallman
2016-12-20 19:10               ` Davis Herring
2016-12-21 17:14                 ` Richard Stallman
2016-12-21 11:28               ` Rasmus
2016-12-21 17:18                 ` Richard Stallman
2016-12-22 10:24                   ` Rasmus
2016-12-22 19:56                     ` Richard Stallman
2016-12-23 13:40                       ` Achim Gratz
2016-12-23 16:18                         ` Richard Stallman
2016-12-24 11:41                           ` Achim Gratz
2016-12-24 18:55                             ` Richard Stallman
2016-12-25 10:04                               ` Achim Gratz
2016-12-25 20:43                                 ` Richard Stallman
2016-12-22  3:13               ` Christopher Allan Webber
2016-12-22 19:54                 ` Richard Stallman
2016-12-23 13:33                   ` Achim Gratz
2016-12-23 16:18                     ` Richard Stallman
2016-12-19 13:44         ` Stefan Monnier
2016-12-19 13:07     ` Richard Stallman
2016-12-19 17:01       ` Bastien Guerry
2016-12-20 18:16         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pokpnn7b.fsf@bzg.fr \
    --to=bzg@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).