1

While I'm learning javascript following a book, I Like to take notes with org-mode. I use Indium and followed this instructions to handle it working

It works well, and I get my work done, interacting with browser, and getting great notes and structure about code, following exercises ...

But I need to type on every src block the session:

#+begin_src js :session "*JS REPL*"
console.log("calimero");
#+end_src

I tried to add, this at the begining of the file but not work:

#+PROPERTY: header-args:js :session "*JS REPL*"

or

#+PROPERTY: header-args:js :session *JS REPL*

or this after the line of the section title:

* my title
 :PROPERTIES:
 :header-args: :session *JS REPL*
 :END:

or

* my title
 :PROPERTIES:
 :header-args: :session "*JS REPL*"
 :END:

or even scaping the * "\JS REPL\*", but nothing works. I only get this error:

/private/var/folders/zs/t9wnzpqj2bdgjjgjwb8pqxc80000gn/T/babel-PdF5nq/js-script-46M5ix:1
require('sys').print(require('sys').inspect(function(){
               ^

TypeError: require(...).print is not a function

at Object.<anonymous> (/private/var/folders/zs/t9wnzpqj2bdgjjgjwb8pqxc80000gn/T/babel-PdF5nq/js-script-46M5ix:1:16)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
at internal/main/run_main_module.js:17:11
  • 2
    First, try setting the session name to a string without whitespaces - maybe :session jsrepl. Second, did you refresh your local settings? Try C-c C-c on the property line or save the file and call revert-buffer. – dangom Aug 4 at 20:56
  • This was the point, thanks @dangom – anquegi Aug 5 at 7:25
  • 1
    @dangom Please convert your comment to an answer. @ anquegi: Please accept dandom's answer. This marks this question-answer-pair as done. – Tobias Aug 5 at 8:25
0

First, set the session name to a string without whitespaces, maybe :session jsrepl. Second, refresh your local settings - either by calling C-c C-c with the cursor above the property line, or save the file and call M-x revert-buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.