parinfer

henrik 2017-08-03T04:16:25.666856Z

I’m really not sure what would be the best way to go, but when faced with a number of displeasing alternatives, the least surprising option might be the best. For me, I’m thinking that might be 1) disable parinfer, 2) truncate all common whitespace from copied rows, 3) paste at the indentation level where the cursor is, 4) reenable parinfer iff brackets are balanced, otherwise reenable as soon as they’ve been manually balanced.

henrik 2017-08-03T04:17:31.677237Z

Not entirely sure though, it’s a hairy problem that makes it hard to estimate how good the solution is until it’s been implemented.

dominicm 2017-08-03T07:05:37.581642Z

Does the new v3 tab/shift tab work on selections? Could drop back to smart mode and allow people to make a selection to correct the indentation. That should fix it if I understand.

shaunlebron 2017-08-03T16:15:22.049667Z

tab works on selections

shaunlebron 2017-08-03T16:17:06.111784Z

but:

(foo
  (bar  ; <-- pasted line could adopt several expressions below
    baz
    ...))

shaunlebron 2017-08-03T16:18:28.160205Z

if you pasted (bar above, and tried correcting its indentation in smart mode, the accidentally adopted lines below it would stick to it during correction, which I’ve found annoying

shaunlebron 2017-08-03T16:19:15.187617Z

the adopted lines would not stick to (bar when adjusting in indent mode, which is why I think it’s better for correcting pastes