all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: how to run javascript in emacs?
Date: Fri, 11 Jul 2008 14:33:38 +1000	[thread overview]
Message-ID: <87ej61rqe5.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 7f65b477-3b87-43bf-aff6-66d195a33b9f@b1g2000hsg.googlegroups.com

Xah <xahlee@gmail.com> 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
> ∑ http://xahlee.org/
>
> ☄

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
repl. 

Tim

-- 
tcross (at) rapttech dot com dot au


  parent reply	other threads:[~2008-07-11  4:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10  1:10 how to run javascript in emacs? Xah
2008-07-10  3:05 ` Xah
2008-07-11  4:33 ` Tim X [this message]
2008-07-16 10:04   ` Arnaud Diederen (aundro)
2008-07-19  4:46     ` David Hansen

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

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

  git send-email \
    --in-reply-to=87ej61rqe5.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.