1
votes

I'm a starter with Emacs (but quite experienced Vim user) and trying to play with Emacs+Clojure combination. Maybe my setup will be unusual for Emacs world, as I'm not using SLIME/swank-clojure, but Emacs + eshell with running clojure REPL in it, mostly due simplicity (or probably because SLIME quite scares me off :D).

So, maybe there is a Emacs guru that can help me here: does exists any shortcut (or maybe some elisp sample) to copy/paste code chunks (sexps) from editing buffer to eshell (and possibly execute it)?

Thanks.

2

2 Answers

3
votes

I think, that you could use standard inferior-lisp command, specifying proper clojure startup command in inferior-lisp-program variable

1
votes

Two commands of interest are kill-sexp (normally bound to C-M-k) and mark-sexp (C-M-@). The latter puts mark where point would go with forward-sexp and can be followed by kill-ring-save (M-w) which saves the region to the kill ring without removing it from the buffer. After killing, yank at your convenience.

Note that SLIME is quite an excellent working environment... You really should give it a try someday. :-)