From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: budu Newsgroups: gmane.emacs.help Subject: How to evaluating expressions in *inferior-lisp* buffer programatically? Date: Sat, 14 Mar 2009 09:07:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1c955ff2-b6a2-4ab5-bd8a-a08d0ffc97c3@13g2000yql.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1237056777 1135 80.91.229.12 (14 Mar 2009 18:52:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Mar 2009 18:52:57 +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 19:54:13 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 1LiYzo-0007Rq-IT for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 19:54:09 +0100 Original-Received: from localhost ([127.0.0.1]:33761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiYyS-0006dF-Mb for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 14:52:44 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!postnews.google.com!13g2000yql.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: 24.202.192.143 Original-X-Trace: posting.google.com 1237046855 31102 127.0.0.1 (14 Mar 2009 16:07:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 14 Mar 2009 16:07:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 13g2000yql.googlegroups.com; posting-host=24.202.192.143; posting-account=dC21OQoAAABW9bHlIPp6ckh_M-fDoV_Y User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729), gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167541 X-Mailman-Approved-At: Sat, 14 Mar 2009 14:52:13 -0400 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:62909 Archived-At: Hi, I've been using Emacs for a few year, but I'm just starting to customize it more deeply. I wonder what is the recommended way of evaluating expressions in the current *inferior-lisp* buffer programatically? I know macros would certainly be OK for such a simple task, yet I tried with elisp and come up with this: (save-current-buffer (set-buffer "*inferior-lisp*") (insert "(use '(foo [bar]))") (lisp-eval-last-sexp) (let ((s (point))) (backward-sexp) (delete-region s (point)))) Do you know of a more straightforward way of doing this? And do you know of any good tutorial on basic elisp? Thanks - budu