Fork me on GitHub
#cursive
<
2016-08-03
>
cfleming01:08:40

@danielcompton: That seems to be working fine for me.

cfleming01:08:23

Just to be clear, your caret needs to be at the end of the form you want to send, e.g. after the closing paren of a list.

danielcompton01:08:01

I read “Send form before caret to REPL” as the one in front of it

danielcompton01:08:07

as in, this lies before me

hlship17:08:45

So … is there a way to change Cursive such that, in paredit mode, an edit that would unbalance nesting would be rejected? Currently, you can select arbitrary text and delete (or replace it) and things go unbalanced. My Emacs friends say that is not possible there.

hlship17:08:17

I would prefer to see a transient bubble that said “Edit rejected: unbalanced” or some such.

hlship17:08:31

Likewise, should not go into paredit mode if source is not initially balanced.

hlship17:08:45

Probably tricky to do this I imagine, but would be very nice.

danielcompton21:08:59

@hlship: the only way I know how to do this is to only select text with paredit commands, then it’s not possible to select text in an unbalanced way

cfleming22:08:08

@hlship: No, there isn’t now but it’s something I’m considering. I’m not sure I can do it, though. Cut and paste is something else that would have to be intercepted, but that is definitely possible.

cfleming23:08:25

@hlship: Just to be clear, your friends are saying that you cannot unbalance Clojure code in Emacs by selecting arbitrary text and deleting it?

hlship23:08:45

Yes. They were just a bit smug about it.

cfleming23:08:52

I don’t believe them.

cfleming23:08:05

Unless things have changed since I last tried it.

hlship23:08:13

It’s too late to check w/ Brandon, since he’s on east coast time.

cfleming23:08:31

Certainly Emacs paredit doesn’t prevent it by default - there may be some new mode which helps with that.

hlship23:08:49

Could be; Brandon is a Spacemacs wizard.

cfleming23:08:51

Perhaps he’s using lispy or something similar - that goes much further, but doesn’t work with arbitrary commands AFAIK. So as long as you only use lispy commands, your code will never be unbalanced.

cfleming23:08:59

i.e. never use stock cut and paste.