Skip to content

cider-eval-list-at-point eval's outer sexp #3318

Closed as not planned
Closed as not planned
@bo-tato

Description

@bo-tato

Expected behavior

On this code (println (+ 1 (* 2 3)))
with the cursor anywhere in (* 2 3) we expect to eval 6, as I understand from: #2881

This adds a new function cider-eval-list-at-point, that evaluates a list around point [as in: code delimited by the nearest pair of parens surrounding point]

Actual behavior

with the cursor anywhere from * 2 3) we get 7, from evaling (+ 1 (* 2 3)), and on the opening ( of (* 2 3) it evals the outer println

CIDER version information

;; CIDER 1.5.0 (Strasbourg), nREPL 1.0.0
;; Clojure 1.11.1, Java 17.0.5

Emacs version

28.1

Operating system

Ubuntu 22.04.1 LTS

JDK distribution

OpenJDK 64-Bit Server VM Temurin-17.0.5+8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions