unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: How to evaluating expressions in *inferior-lisp* buffer programatically?
Date: Sat, 14 Mar 2009 20:54:23 +0100	[thread overview]
Message-ID: <87r60zswwg.fsf@galatea.local> (raw)
In-Reply-To: 220f49dc-f1d0-46de-a85c-604c946ac70f@o36g2000yqh.googlegroups.com

budu <nbuduroi@gmail.com> writes:

> On Mar 14, 12:24 pm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> budu <nbudu...@gmail.com> 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__


      reply	other threads:[~2009-03-14 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14 16:07 How to evaluating expressions in *inferior-lisp* buffer programatically? budu
2009-03-14 16:24 ` Pascal J. Bourguignon
2009-03-14 19:15   ` budu
2009-03-14 19:54     ` Pascal J. Bourguignon [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87r60zswwg.fsf@galatea.local \
    --to=pjb@informatimago.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).