From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bastien Guerry Newsgroups: gmane.emacs.devel Subject: Re: Condition to link to javascript code? Date: Sun, 18 Dec 2016 18:47:52 +0100 Message-ID: <87pokpnn7b.fsf@bzg.fr> References: <87eg19uc8y.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482083296 16809 195.159.176.226 (18 Dec 2016 17:48:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Dec 2016 17:48:16 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 18 18:48:12 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIfZD-0003GR-2H for ged-emacs-devel@m.gmane.org; Sun, 18 Dec 2016 18:48:11 +0100 Original-Received: from localhost ([::1]:41612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIfZH-0001PD-CH for ged-emacs-devel@m.gmane.org; Sun, 18 Dec 2016 12:48:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIfZA-0001P5-VX for emacs-devel@gnu.org; Sun, 18 Dec 2016 12:48:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIfZ6-0000Cv-Fb for emacs-devel@gnu.org; Sun, 18 Dec 2016 12:48:08 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIfZ6-0000Cr-Bf for emacs-devel@gnu.org; Sun, 18 Dec 2016 12:48:04 -0500 Original-Received: from [78.192.157.63] (port=43372 helo=bzg.fr) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1cIfYy-0002Ys-U9; Sun, 18 Dec 2016 12:47:57 -0500 Original-Received: by bzg.fr (Postfix, from userid 1000) id A37F038BAB1; Sun, 18 Dec 2016 18:47:52 +0100 (CET) In-Reply-To: (Richard Stallman's message of "Sat, 17 Dec 2016 10:47:42 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210605 Archived-At: Hi Richard, Richard Stallman 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 tag: (+ 1 2) 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