最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

no org-babel-execute function for javascript in emacs org-babel - Stack Overflow

programmeradmin2浏览0评论

I have added the following code to my init file. But I still get the error.

(org-babel-do-load-languages
      'org-babel-load-languages
      '((js . t)))

I noticed in Babel supported Languages, it says javascript requires node.js. So I download node.js and added the folder to my Environment PATH. However, I got the same error.

So how could I run javascript in org-babel?

I have added the following code to my init file. But I still get the error.

(org-babel-do-load-languages
      'org-babel-load-languages
      '((js . t)))

I noticed in Babel supported Languages, it says javascript requires node.js. So I download node.js and added the folder to my Environment PATH. However, I got the same error.

So how could I run javascript in org-babel?

Share Improve this question asked Nov 16, 2018 at 5:59 YnjxsjmhYnjxsjmh 30.1k7 gold badges42 silver badges62 bronze badges 1
  • have a look at emacs.stackexchange./a/20846/17548 – manandearth Commented Nov 16, 2018 at 17:35
Add a ment  | 

1 Answer 1

Reset to default 9

Thanks for @manandearth's link, I partly sovle this question:

Reason why I got the prompt is that I wrote the wrong src block identifier in my case.

Since I write (js . t), so it should like

#+BEGIN_SRC js
console.log("hello world");
#+END_SRC

Not

#+BEGIN_SRC javascript
console.log("hello world");
#+END_SRC

Possible identifiers can be found at https://orgmode/org.html#Languages and https://orgmode/worg/org-contrib/babel/languages.html.

发布评论

评论列表(0)

  1. 暂无评论