[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to evaluating expressions in *inferior-lisp* buffer programatica
From: |
Pascal J. Bourguignon |
Subject: |
Re: How to evaluating expressions in *inferior-lisp* buffer programatically? |
Date: |
Sat, 14 Mar 2009 20:54:23 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
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__