Skip to content

Evaluate block does not work for top-most block #228

@hovsater

Description

@hovsater

First of all, thanks for all work you've put into Chlorine, it's a wonderful package. ❤️

I'm not sure this is a bug or not. If it's not, feel free to close this issue. 🙂

I thought the difference between Chlorine: Evaluate Block and Chlorine: Evaluate Top Block is that Chlorine: Evaluate Block will evaluate the current form (relative to the cursor position) while Chlorine: Evaluate Top Block would evaluate the top-most form (relative to the cursor position).

(for [x (range 1 10)] (* x 2))  ; Cursor is immediately after `x`.

The above example would evaluate to (1 2 3 4 5 6 7 8 9) using Chlorine: Evaluate Block while it would evaluate to (2 4 6 8 10 12 14 16 18) using Chlorine: Evaluate Top Block. Of course, I could achieve the same thing by moving my cursor to the start of the line and run Chlorine: Evaluate Block, correctly giving me (2 4 6 8 10 12 14 16 18) as well.

This all make sense to me. Now here's a different example.

Thread$State

The above example would evaluate to java.lang.Thread$State using Chlorine: Evaluate Top Block. But Chlorine: Evaluate Block does not evaluate this example at all.

Is that a bug, or am I just misunderstanding how these features work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions