Fork me on GitHub
#emacs
<
2018-05-09
>
soulflyer04:05:50

Is there an easy way to stop emacs from re-centering the cursor when using cider-repl-backward-input? It doesn't always do it, just often enough to be seriously distracting 😕

hlolli12:05:09

I've never questioned this eldoc behaviour until now, I believe I've never seen eldoc behave otherwise. So it's like this, imagine the pipe is the cursor:

(set |)
____
set: (SYMBOL NEWVAL)
____
I delete one char and the minibuffer is empty
(set|)
____
____
I move right
(set)|
____
____
I move back left and I get the eldoc info back
(set|)
____
set: (SYMBOL NEWVAL)
____
So I tend to be constantly moveing around with the arrows to retrigger the eldoc. Is there a config/workaround to have the eldoc not disappear on the doing backspace?

andrea.crotti15:05:52

Mm maybe there is a way but it seems normal behavior to me

andrea.crotti15:05:08

How does it know you are not done writing the function name if there is no space? @hlolli

hlolli19:05:33

@andrea.crotti it knows the function name, you can see that for two reasons, one that by moveing the cursor from right to left without adding a space, will show the eldoc in the minibuffer (this is probably due to syntax-table mechanism), another reason is that I can add any amount of spaces

(set                 |)
____
set: (SYMBOL NEWVAL)
____
then I click backspace and the eldoc is gone
(set                |)
____
____
I have a theory that this is eldoc trying to be efficient, because when clicking space you're much likely to be next to a symbol that eldoc can find, vs clicking backspace you can be deleting a symbol, and the odds are much lower that it renders result. But I'd like to send eldoc to work anyway, my computer is fast enough and I think this optimization is not neccecary.

hlolli19:05:25

ah bingo, found the reason for this this is paredit-backward-delete that's causing this, this doen't happen if paredit mode is disabled. I think I'll just open a ticket 😛

hlolli19:05:21

sent the maintainer of paredit just direct email, since there's no source-tree for the project. Fingers crossed.