Skip to content

Inconsistent cursor behaviour after evaluation of clojure code resulting in error #3331

@practicalli-johnny

Description

@practicalli-johnny

Expected behavior

Consistent behaviour of the cursor after evaluating an expression in the buffer that causes an error.

The behaviour should happen 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)

Actual behavior

Cursor inconsistent movement after evaluating an expression in the buffer that causes an error (incorrect clojure code)

Steps to reproduce the problem

Open a Clojure .clj file from a project which has a namespace definition:

  1. Call a function that is not defined and the cursor will jump to the opening bracket of the call expression, |(foo)
  2. Call an evaluated function with incorrect number of arguments, cursor does not move
  3. Evaluate a non-existent symbol, e.g blahblah and the cursor jumps to the top of the namespace

It is 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?

Environment & Version information

CIDER version information

CIDER 1.7.0-snapshot (package: 20230226.1413)
nrepl 1.0.0

Lein / Clojure CLI version

Clojure CLI version 1.11.1.1252

Emacs version

Emacs 28

Operating system

Ubuntu 22.04

JDK distribution

openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Ubuntu-0ubuntu122.04, mixed mode, sharing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions