From mboxrd@z Thu Jan 1 00:00:00 1970 From: Compro Prasad Subject: Bug: Error in org-babel due to adding comments at the end in js codeblock Date: Sun, 20 Nov 2016 20:53:42 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11410fc6da13280541bd1f8a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8Ty5-0005Hk-BB for emacs-orgmode@gnu.org; Sun, 20 Nov 2016 10:23:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8Ty4-0005uI-Lt for emacs-orgmode@gnu.org; Sun, 20 Nov 2016 10:23:45 -0500 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37288) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8Ty4-0005u5-ET for emacs-orgmode@gnu.org; Sun, 20 Nov 2016 10:23:44 -0500 Received: by mail-wm0-x22e.google.com with SMTP id t79so106574223wmt.0 for ; Sun, 20 Nov 2016 07:23:44 -0800 (PST) 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: emacs-orgmode@gnu.org --001a11410fc6da13280541bd1f8a Content-Type: text/plain; charset=UTF-8 #+BEGIN_SRC js var school = { schoolName: "MIT" } console.log(school.hasOwnProperty("schoolName")) // true #+END_SRC The execution of the above codeblock produces error because of the comment at the end. I realised it when I opened the temporary file org-babel was using to execute the code. The temporary file had the following js code: require('sys').print(require('sys').inspect(function(){var school = { schoolName: "MIT" } console.log(school.hasOwnProperty("schoolName")) // true}())); And there were no errors for sure when I removed the comment. Hope the bug gets fixed. Emacs : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 on lgw01-10, modified by Debian Package: Org mode version 9.0.1 (9.0.1-elpa @ /home/compro/.emacs.d/elpa/org-20161118/) --001a11410fc6da13280541bd1f8a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
#+BEGIN_SRC js
var school =3D { schoolName: "MIT&q= uot; }
console.log(school.hasOwnProperty("schoolName")) // tru= e
#+END_SRC
The execution of the above codeblock produces error becau= se of the
comment at the end.

I realised it when I opened the tem= porary file org-babel was using to
execute the code. The temporary file = had the following js code:

require('sys').print(require('= ;sys').inspect(function(){var school =3D { schoolName: "MIT" = }
console.log(school.hasOwnProperty("schoolName")) // true}())= );

And there were no errors for sure when I removed the comment.
=
Hope the bug gets fixed.


Emacs=C2=A0 : GNU Emacs 24.5.1 (x86= _64-pc-linux-gnu, GTK+ Version 3.18.9)
=C2=A0of 2016-04-25 on lgw01-10, = modified by Debian
Package: Org mode version 9.0.1 (9.0.1-elpa @ /home/c= ompro/.emacs.d/elpa/org-20161118/)

--001a11410fc6da13280541bd1f8a--