From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: REPL Date: Sat, 04 Dec 2004 12:21:49 +0100 Message-ID: <878y8e48c2.fsf@ID-87814.user.uni-berlin.de> References: <30s1jaF34d3v2U1@uni-berlin.de> <30uhh2F34su3sU1@uni-berlin.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1102159522 8985 80.91.229.6 (4 Dec 2004 11:25:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2004 11:25:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 04 12:25:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CaY2N-0002hs-00 for ; Sat, 04 Dec 2004 12:25:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CaYC1-0000y8-Te for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Dec 2004 06:35:13 -0500 Original-Newsgroups: gnu.emacs.help X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:QvabIG+UfdhyrvRyEUWcnPHxc8E= Original-NNTP-Posting-Host: 84.57.72.30 Original-X-Trace: 4 Dec 2004 12:23:19 +0100, 84.57.72.30 Original-Lines: 25 Original-X-Complaints-To: abuse@arcor-ip.de Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsfeed.arcor-ip.de!news.arcor-ip.de!84.57.72.30 Original-Xref: shelby.stanford.edu gnu.emacs.help:127139 Original-To: help-gnu-emacs@gnu.org 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: main.gmane.org gmane.emacs.help:22556 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22556 [Since M-x ielm has already been pointed to by others ...] Elvin Peterson writes: [...] > IIRC, the REPL code for COMMON LISP is just a couple of lines, so I > was hoping someone would post similar stuff for emacs. Sure, to get a very basic REPL in Emacs is simple: ;; Because we use `loop' for the looks of it: (require 'cl) (let* ((buffer (generate-new-buffer "*tmp*")) (standard-output buffer)) (switch-to-buffer buffer) ;; The REPL: (loop (print (eval (read))))) The extra code in ielm is to get something a tiny little bit more comfortable. Oliver -- 14 Frimaire an 213 de la Révolution Liberté, Egalité, Fraternité!