From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: how to run javascript in emacs? Date: Wed, 9 Jul 2008 20:05:47 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <7f65b477-3b87-43bf-aff6-66d195a33b9f@b1g2000hsg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1215661242 25831 80.91.229.12 (10 Jul 2008 03:40:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jul 2008 03:40:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 10 05:41:28 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KGn28-0007Yz-Jz for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jul 2008 05:41:28 +0200 Original-Received: from localhost ([127.0.0.1]:52855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGn1H-00077n-1U for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jul 2008 23:40:35 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!34g2000hsf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1215659147 15011 127.0.0.1 (10 Jul 2008 03:05:47 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 10 Jul 2008 03:05:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 34g2000hsf.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:160015 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55366 Archived-At: answer to my own question: just installed spidermonkey thru MacPorts. It works great. (Spidermonkey is the js engine written in C) Xah On Jul 9, 6:10=C2=A0pm, Xah wrote: > 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... =C2=A0is there a way to call the js interpret= er > with operating system's command line? If so, that'd solve my problem. > (am not familiar with FF dev) > > Thanks. > > =C2=A0 Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84