From: budu <nbuduroi@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: How to evaluating expressions in *inferior-lisp* buffer programatically?
Date: Sat, 14 Mar 2009 09:07:35 -0700 (PDT) [thread overview]
Message-ID: <1c955ff2-b6a2-4ab5-bd8a-a08d0ffc97c3@13g2000yql.googlegroups.com> (raw)
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
next reply other threads:[~2009-03-14 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-14 16:07 budu [this message]
2009-03-14 16:24 ` How to evaluating expressions in *inferior-lisp* buffer programatically? Pascal J. Bourguignon
2009-03-14 19:15 ` budu
2009-03-14 19:54 ` Pascal J. Bourguignon
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=1c955ff2-b6a2-4ab5-bd8a-a08d0ffc97c3@13g2000yql.googlegroups.com \
--to=nbuduroi@gmail.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).