From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: How to evaluating expressions in *inferior-lisp* buffer programatically? Date: Sat, 14 Mar 2009 20:54:23 +0100 Organization: Informatimago Message-ID: <87r60zswwg.fsf@galatea.local> References: <1c955ff2-b6a2-4ab5-bd8a-a08d0ffc97c3@13g2000yql.googlegroups.com> <87ljr8t6n2.fsf@galatea.local> <220f49dc-f1d0-46de-a85c-604c946ac70f@o36g2000yqh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1237063247 18668 80.91.229.12 (14 Mar 2009 20:40:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Mar 2009 20:40:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 14 21:42:04 2009 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 1LiagE-0006VG-5R for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 21:42:02 +0100 Original-Received: from localhost ([127.0.0.1]:37103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Liaer-0002SK-Uj for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 16:40:38 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!cleanfeed4-a.proxad.net!nnrp6-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Cancel-Lock: sha1:ZDE2ZjA5MTIyOTAzODkyOGFiMzg3MTUzMWIwMDNjOTk4NTAwMTVkMA== Original-Lines: 23 Original-NNTP-Posting-Date: 14 Mar 2009 20:54:24 MET Original-NNTP-Posting-Host: 88.182.134.169 Original-X-Trace: 1237060464 news-3.free.fr 4556 88.182.134.169:49393 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:167545 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:62912 Archived-At: budu writes: > On Mar 14, 12:24 pm, p...@informatimago.com (Pascal J. Bourguignon) > wrote: >> budu writes: >> > Do you know of a more straightforward way of doing this? And do you >> > know of any good tutorial on basic elisp? Thanks >> >> (defun eval-in-inferior-lisp (expression-string) >>   (comint-send-string (inferior-lisp-proc) (format " %s\n" expression-string)) >>   (switch-to-lisp t)) >> >> (eval-in-inferior-lisp "(- 22/7 cl:pi)") > > Great! This will be much cleaner. Thanks Notice that when you use slime, you can also call emacs functions from the inferior lisp. http://paste.lisp.org/display/22414 (it's a little old, I don't know if it still works with current versions of slime). -- __Pascal Bourguignon__