Fork me on GitHub
#cider
<
2020-01-31
>
FiVo11:01:18

Hey. Trying to dig a bit into the debugger. This file mentions some read-and-instrument function which I can't seem to find. Are these some old comments? https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/util/instrument.clj#L29

bozhidar13:01:47

Seems we never updated some of the comments.

FiVo14:01:07

@U051BLM8F Thanks. Do you mind sharing how you would actually look at instrumented code. I am currently doing something of the form:

(binding [*data-readers* (assoc *data-readers* 'break #'breakpoint-reader)]
  (cider.nrepl.middleware.util.instrument/print-form
   (cider.nrepl.middleware.util.instrument/instrument-tagged-code
    (read-string "(dotimes [i 10] #break (prn i))"))
   true true))
Which seems a bit overkill and I am not even sure this is correct. Is there an easier way?

bozhidar16:02:36

That looks reasonable to me, although if you’re playing with the code from CIDER probably you don’t need the binding form, as cider-nrepl should be setting this already.

bozhidar16:02:11

I guess I really need to find some time for documenting things better. 🙂

andrea.crotti15:01:52

I can't understand why cider keeps on overriding my local-set-key for "M-.", my clojure-mode-hook looks like this

ELISP> clojure-mode-hook
(smartparens-strict-mode
 (lambda nil
   (set
    (make-local-variable 'cider-repl-use-pretty-printing)
    t)
   (local-set-key
    (kbd "M-.")
    'ca-cider-or-dumb-jump)
   (local-set-key
    [f5]
    'helm-imenu)
   (local-set-key
    [f6]
    'cljr-helm)
   (local-set-key
    (kbd "<C-f5>")
    'cider-test-run-test)
   (cider-auto-test-mode t))
 cider-mode
 #[0 "\301\300!\210\302\211\207"
     [sesman-system make-local-variable CIDER]
     2]
 (lambda nil
   (set
    (make-local-variable 'sesman-system)
    'CIDER))
 clojure--check-wrong-major-mode)

andrea.crotti15:01:24

but M-. is always bound to cider-find-var instead of the function I define