[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run javascript in emacs?

From: Tim X
Subject: Re: how to run javascript in emacs?
Date: Fri, 11 Jul 2008 14:33:38 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Xah <address@hidden> writes:

> I want to run Javascript in a console with emacs. Does anyone have
> suggestions on what's the solution?
> Here's some detail... In perl/python/php, i can just write the code in
> a buffer/file and run it with M-!. I would like to have something
> similar for javascript. Basically, with the end result that i just
> type in a buffer, save, press some button or command in emacs, and see
> results. How can i do this?
> I haven't much experience in coding javascript other than coding
> simple sample scripts, and today i just downloaded Firebug in Firefox
> 3 but i don't want to have to switch to the browser.
> The context is learning and experimenting with the language. I don't
> need the DOM attached. Just need to for example write fibonacci or
> prime generator and or other pure string manipulation functions with
> js.
> Since FF has a js engine...  is there a way to call the js interpreter
> with operating system's command line? If so, that'd solve my problem.
> (am not familiar with FF dev)
> Thanks.
>   Xah

Have a look at mozlab. It provides a REPL into firfox where you can
inspect the current document and execute javascript. There is an elisp
interface which will allow you to run the repl within emacs. 

There is also a javascript mode, but I don't know how good it is or what
capabilities it has, but I suspect you could have a buffer running
javascript and define keys that will send the contents to the firefox


tcross (at) rapttech dot com dot au

reply via email to

[Prev in Thread] Current Thread [Next in Thread]