Discussion:
slime help
Alexandre Rademaker
2011-03-11 15:21:13 UTC
Permalink
Hello,

Sorry if this list is not the best place to ask this question... Maybe
we should create a newbie lisp list!

What is the easy way to copy/paste a form from a source code buffer to
slime prompt? Is there any keyboard shortcut emacs/slime-mode to copy
the whole body of a form from anywhere within it??

Cheers,

Alexandre Rademaker
http://web.me.com/arademaker/
Zach Beane
2011-03-11 15:27:59 UTC
Permalink
Post by Alexandre Rademaker
Hello,
Sorry if this list is not the best place to ask this question... Maybe
we should create a newbie lisp list!
I don't think this is a good place for the question; there's a list for
slime questions, and lots of places to ask emacs questions.
Post by Alexandre Rademaker
What is the easy way to copy/paste a form from a source code buffer to
slime prompt? Is there any keyboard shortcut emacs/slime-mode to copy
the whole body of a form from anywhere within it??
One way is:

C-M-a - beginning-of-defun
C-M-SPC - mark-sexp
M-w - kill-ring-save

Then you can can switch to the repl and C-y it.

There might be a shortcut to do all of that in one step, but I don't
know about it.

If you just want to send a form to your Lisp, you can do that without
involving the repl, C-M-x or C-c C-c will do the trick.

Zach
Hexstream
2011-03-11 17:01:59 UTC
Permalink
My favorite way is:

1. Put the cursor before the s-expression

2. Invoke C-M-k (kill-sexp)

3. Immediately C-y (yank) to put the s-expression back in its place,
OR If I'm copying from an "untouched" source buffer, I'll use C-x u
(undo) instead, to keep the buffer in its "untouched" state.

4. Paste to wherever you need this s-expression. Remember that if you
subsequently copy something else in the kill ring, you can access
older entries conveniently by first doing C-y (yank) and then
immediately doing M-y (yank-pop). This is very useful.

Hope this helps!

Loading...