Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A more flexible evaluate-to-cursor command #1901

Closed
PEZ opened this issue Oct 18, 2022 · 0 comments
Closed

A more flexible evaluate-to-cursor command #1901

PEZ opened this issue Oct 18, 2022 · 0 comments

Comments

@PEZ
Copy link
Collaborator

PEZ commented Oct 18, 2022

I want a to be able to evaluate-to-cursor from a wherever before the cursor. Evaluate From Start of List is great, but only takes me that far if I have created a monster like this:

(ns fortytwo-lab)

;; Evaluate selection to Cursor
(defn fortytwo-from-thirty
  []
  (let [thirty 30]
    (-> thirty
        (->>
         inc
         (+ 1 2 3) ; Eval from start of list => "6function be(a){return a+1}" (Joyride REPL)
         (+ 2 2)  
         (+))      ; Eval from start of list => Could not resolve symbol: thirty
        list
        (->>
         (into [1])
         (reduce + 1))
        (- 1)
        (* -1))))

(comment
  (fortytwo-from-thirty) ;; => -42 (WRONG answer! (or question?))
  )

If I could somehow choose the starting point for the Evaluate to cursor, I could include the let binding and examine the monster much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant