Fork me on GitHub
#cider
<
2023-03-28
>
practicalli-johnny20:03:36

I noticed curious cursor behaviour when evaluating Clojure code in the editor buffer, which happens irrespective of if cider-show-error-buffer is set to t or nil (except when t then q should be pressed to quit the error buffer) I open a Clojure .clj file from a project which has a namespace definition: 1. Calling a function that is not defined will jump the cursor to the opening bracket of the call expression, (foo) 2. Calling an evaluated function with incorrect number of arguments does not move the cursor 3. Evaluating a non-existent symbol blahblah jumps the cursor to the top of the namespace Is this the expected behaviour for Cider? I assumed that 1. and 2. would behave the same, the cursor jumping to the start of the calling expression (or not moving) Behaviour 3 feels quite strange, I dont know what value is provided by the cursor jumping away (I appreciate this situation would not happen very often though) Is there a way to customise the cursor movement on error? Or is it simply the way its been implemented? Thank you

👍 2
hifumi12321:03:22

I do not observe the behavior in (3) when I use *cider-scratch* buffer. But I am getting a “Beginning of buffer” message in my echo box

Drew Verlee04:03:26

@U0479UCF48H what is the cider scratch buffer?

hifumi12304:03:11

M-x cider-scratch It’s a glorified scratch buffer. A bit quicker than C-x b , selecting *scratch* , then typing M-x clojure-mode

Drew Verlee04:03:21

ah, thanks, i found it. i guess i added the * for a second and it wasn't coming up

Drew Verlee04:03:50

what editor are you using, i also get the (3) behavior above, so I'm trying to narrow it down

practicalli-johnny06:03:26

Behaviour 3 occurs in a Clojure project, with namespace definition The scratchpad is a buffer with no underlying file https://docs.cider.mx/cider/usage/misc_features.html#using-a-scratchpad

practicalli-johnny08:04:44

I'll report this as an issue on the cider repository as it hasn't been confirmed as expected behavior

Drew Verlee15:04:39

thanks @U05254DQM, i should have done that a while back. I guess i assumed it was something on my end or else why wouldn't it have been reported before? Maybe I'm just really good at hitting edge cases 😕

😁 2