admin管理员组文章数量:1193728
Is there such a thing as a javascript equivalent to run-python
et al available for Emacs 23 or later? I'd like to run a JS REPL from within Emacs with the standard load-definition
/load-file
bindings.
Is there such a thing as a javascript equivalent to run-python
et al available for Emacs 23 or later? I'd like to run a JS REPL from within Emacs with the standard load-definition
/load-file
bindings.
- Can you give an example JavaScript you'd like to run? What operating system? – Brigand Commented Feb 25, 2012 at 2:55
4 Answers
Reset to default 9Oh, this is cool. (Thanks for the question!)
I've just learned about MozRepl -- a Mozilla/Firefox extension -- via this answer to a related question, and Emacs support for MozRepl is already available.
- Install the browser extension and the Emacs library
- Start MozRepl from the browser using the Tools -> MozRepl menu
- M-x
run-mozilla
RET
See also http://www.emacswiki.org/emacs/MozRepl
Yes. Check out js-comint.el
, which is easily installable via Marmalade or MELPA.
As @phils mentions, MozRepl is also worth a look.
There's a project called skewer-mode that I've been using for this lately. For the lispers, it's basically SLIME with a browser instead of a Lisp system on the other end. It's available from MELPA and includes only Emacs libraries. Meaning, all you need to use it is Emacs and a browser.
There's also a WSH-based Javascript REPL. Really easy to run on any emacs on Windows.
http://www.emacswiki.org/emacs/JavascriptShell
- Start a Javascript "shell" in an emacs buffer. Type in Javascript and see it run.
- It allows you to define a profile, to load one or more JS modules with every shell you run. So if you want to fiddle around with json2.js, you can load it into the shell by default. You can also load in array extensions, string extensions, or whatever utility package you have.
- Includes simple command completion. If I type in
var str = "This is a string";
then try to complete (via the TAB character) onstr.
, I will get a list of all the string extension methods. The same thing works for any other type of object, even custom objects you define. - Depends on Cscript.exe, so nothing to install beyond the .el file. Obviously this means it runs on Windows only.
It's also in the Marmalade repo - http://marmalade-repo.org/packages/jsshell
本文标签: Emacs runjavascriptStack Overflow
版权声明:本文标题:Emacs run-javascript? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738458292a2087880.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论