Fork me on GitHub
#cider
<
2017-05-18
>
andrea.crotti10:05:59

hi everyone, quick question, some weeks ago the Cider REPL started behaving a bit differently

andrea.crotti10:05:13

pressing TAB now on an empty line actually indents the REPL

andrea.crotti10:05:29

I'm quite sure it didn't use to do that

andrea.crotti10:05:46

is that something that was done on purpose or maybe a known bug/feature?

dpsutton13:05:04

@andrea.crotti I've seen this as well and I have no explanation

andrea.crotti13:05:33

good that I'm not the only one @dpsutton I can file an issue on github

andrea.crotti13:05:39

since it looks like a bug to me

dpsutton13:05:42

not sure what we can do though

dpsutton13:05:43

(defun cider-repl-indent-and-complete-symbol ()
      "Indent the current line and perform symbol completion.
    First indent the line.  If indenting doesn't move point, complete
    the symbol."
      (interactive)
      (let ((pos (point)))
        (lisp-indent-line)
        (when (= pos (point))
          (if (save-excursion (re-search-backward "[^() \n\t\r]+\\=" nil t))
              (completion-at-point)))))

dpsutton13:05:08

the lisp-indent-line is out of our hands

dpsutton13:05:28

this is a strange one. i wonder why it has changed recently

andrea.crotti13:05:33

well it must be something that changed in Cider right?

andrea.crotti13:05:05

at least I assumed so, but to be fair I'm keeping Emacs updated as well, now on GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-05-17

dpsutton13:05:25

all of the code connected to pressing tab has existed since 2013 it seems

bozhidar14:05:36

Likely a change in Emacs.

andrea.crotti15:05:01

mm well for me the change seemed way more recent than that @dpsutton

dpsutton15:05:16

what emacs are you running? you mentioned 25.2

dpsutton15:05:28

i'm building from source so i'm 26.x

andrea.crotti15:05:28

no 26.0.50 as pasted above

dpsutton15:05:32

ah same here

andrea.crotti15:05:42

but on 26 from some time ago it wasn't like that

dpsutton15:05:43

tip of emacs is a little wonky then

andrea.crotti15:05:53

ok good to know I'll see if I can find something about that