emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Compro Prasad <comproprasad@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <CAF5vbPkJcOGttgREVLTsrdDHu-bA1Eiu_tzMpBa5cEusUV19xw@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2016-11-20 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 15:23 Compro Prasad [this message]
2016-11-21 22:29 ` Bug: Error in org-babel due to adding comments at the end in js codeblock Nicolas Goaziou

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.orgmode.org/

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

  git send-email \
    --in-reply-to=CAF5vbPkJcOGttgREVLTsrdDHu-bA1Eiu_tzMpBa5cEusUV19xw@mail.gmail.com \
    --to=comproprasad@gmail.com \
    --cc=emacs-orgmode@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/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).