Fork me on GitHub
#emacs
<
2018-09-29
>
Chase20:09:50

so i'm slowly building up my init.el for the first time and haven't yet decided between smartparens, paredit, parinfer, or lispy and am not using any of them right now so I don't get any auto closing paren goodness yet which is fine. one thing i do love though is that C-RET in the Repl just completes all my ending parens for me before evaluating. is there a way I can get that functionality in my actual code buffer?

vemv20:09:28

Paredit (and presumably others) complete ) for (s, and ensure that you can't delete )s in a breaking manner So that feature (as I understand it: infer and repair paren state before saving a buffer, or eval'ing it) might be unneeded?

Chase20:09:40

true. i definitely plan on learning one of those tools for moving and restructuring s-expressions as such. right now i'm trying to limit adding one more big thing to the learning list as I'm also in the early stages of my programming (and clojure and vanilla emacs) journey. So i was just curious if i could get that ending parens help before I dive into the heavy tools. that cider repl feature is super handy with my current work flow. no biggy though

vemv20:09:23

You defo can use Paredit just for the mentioned aspect, without having to learn any shortcut. I use classic paredit (v 22, from 2010). There's a newer version, but it's a beta. Continues to work flawlessly for me 🙂

Chase20:09:27

fair enough, makes sense. i know myself though and there is no way i'm going to resist the temptation to try out all of them and tinker, tinker, tinker. lol

😂 4
Chase20:09:02

Another curiosity: I also see a lot of people say as their clojure ability advances they end up just evaluating s-exp in the buffer itself instead of typing in the actual repl. i can see myself drifting to that but when they say that are they usually meaning they still have the repl in view in a split window or that they don't even have it in sight? I find a lot of the inline evaluation in my code buffer just shows me nil or whatever which isn't so helpful in this learning phase. i like to play around with the functions, trying new things and looking up docs while in the repl. are they doing this within their actual code buffer instead?

Chase20:09:21

apologies for the verbosity, that seems to just be what i do when thinking of how to ask this stuff

vemv20:09:14

This menu gives you functionality for both kinds of evaluation:

Chase20:09:15

definitely. i have my handy cider cheat sheet near with the keyboard commands for those evaluations. i was just curious if people are really exploring around and building up functions within their actual code buffer vs doing it in the repl until they have the function they want and copying it over to the code buffer. maybe i'm too infatuated with how cool the repl is

vemv20:09:50

So I author a .clj namespace within the file buffer itself. From time to time I'll vemv/send some sexprs (like defuns, but also experiments). Or I'll just eval the whole buffer if there's no need for being incremental

Chase20:09:50

cool beans. i'll bookmark for the future. and this just adds another notch on my growing emacs infatuation. how cool is it that you code up some lisp (another infatuation!) to make this cool tool do what you want. i'm loving this stuff!

✌️ 4
andy.fingerhut22:09:18

If you prefer to run bits of code purely in the REPL, and only after it is something you want to keep, copy it into a buffer that gets saved, no one is going to stop you 🙂 I get the impression that Stuart Halloway does all of his code entry in the window/buffer that gets saved to disk, and the only expressions he evals in the REPL are sent from that buffer: https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.md