
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/

Alexandre Rademaker <arademaker@gmail.com> writes:
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.
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

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!
participants (3)
-
Alexandre Rademaker
-
Hexstream
-
Zach Beane