emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Error in org-babel due to adding comments at the end in js codeblock
@ 2016-11-20 15:23 Compro Prasad
  2016-11-21 22:29 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Compro Prasad @ 2016-11-20 15:23 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

#+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/)

[-- Attachment #2: Type: text/html, Size: 936 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: Error in org-babel due to adding comments at the end in js codeblock
  2016-11-20 15:23 Bug: Error in org-babel due to adding comments at the end in js codeblock Compro Prasad
@ 2016-11-21 22:29 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-11-21 22:29 UTC (permalink / raw)
  To: Compro Prasad; +Cc: emacs-orgmode

Hello,

Compro Prasad <comproprasad@gmail.com> writes:

> #+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.

Fixed, hopefully. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-21 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-20 15:23 Bug: Error in org-babel due to adding comments at the end in js codeblock Compro Prasad
2016-11-21 22:29 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).