Fork me on GitHub
#cider
<
2022-10-01
>
Drew Verlee03:10:07

How do i learn more about cider enlighten mode? I was able to describe function and find this

(define-minor-mode cider-enlighten-mode nil
  :lighter (cider-mode " light")
  :global t)
But i'm confused on how to understand more of what's going on. How does that relate to the results getting displayed on the screen. (or at least where should i be looking to learn more?)

Benjamin11:10:42

(defn foo [i] i)

(defn bar [x]
  (dotimes [i x]
    (foo i)))

(bar 10)
try some code like this with enlighten mode turned on. It is more like a tracing debug feature. The default results on the screen is separate from this

Drew Verlee14:10:02

@U02CV2P4J6S thanks. Let me clarify, I'm trying to debug an issue im having with it, where it won't clear the results ever. Even if i turn the mode off. Im trying to find out how it works, but all i can find is the elisp above, I'm not sure how to trace it to anything else.

Benjamin15:10:13

(remove-overlays (point-min) (point-max) 'category 'enlighten)
this should do it. Alternatively you kill the buffer and find the file again 🤷

👀 2
Drew Verlee04:10:52

ill give that a try! ty ty.

Drew Verlee04:10:12

i'm such a noob, how do i "try that" can i just execute that elisp code anywhere? i guess so? ill give that a try

Benjamin07:10:08

M-: -> paste it. Or define a command: eval, or paste into an elisp buffer e.g. scratch buffer and eval defun

(defun remove-enlighten-overlays ()
  (interactive)
  (remove-overlays
   (point-min)
   (point-max)
   'category
   'enlighten))

👍 1
Drew Verlee04:11:55

@U02CV2P4J6S i just got back to trying this, and it works. Thanks a ton!

clojure-spin 1