This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-19
Channels
- # aleph (11)
- # aws (1)
- # beginners (14)
- # bitcoin (1)
- # boot (41)
- # cider (6)
- # cljs-dev (1)
- # cljsrn (13)
- # clojure (138)
- # clojure-italy (10)
- # clojure-nl (1)
- # clojure-poland (2)
- # clojure-russia (62)
- # clojure-sg (2)
- # clojure-spec (31)
- # clojure-uk (51)
- # clojurescript (109)
- # core-matrix (1)
- # core-typed (1)
- # cursive (63)
- # datomic (10)
- # emacs (9)
- # euroclojure (1)
- # hoplon (112)
- # immutant (16)
- # jobs (2)
- # lumo (5)
- # off-topic (14)
- # om (54)
- # onyx (17)
- # parinfer (23)
- # pedestal (2)
- # re-frame (41)
- # ring-swagger (23)
- # spacemacs (9)
- # specter (10)
- # uncomplicate (5)
- # vim (1)
I've found an interesting way how to temporarily modify the code of 3rd party clojure library (e.g. for debugging purposes - adding println statements, etc.) and apply the changes to current REPL.
Let's take as an example clj-http
library:
1. run cider-open-classpath-entry
2. search for clj-http; open (ENTER)
3. search for namespace, e.g. clj_http/core.clj
; open (ENTER)
4. search for function of interest, e.g. get-route-planner
modify
5. eval in cider repl - answer "n" to question "File ... is read-only on disk. Make buffer read-only, too?"
I wonder if anyone else ever do similar stuff and whether there's a more reasonable/convenient approach to do this
@jumar I do this regularily. But I use M-.
to go to the source of the function/macro in question and C-x C-q
to make the buffer writeable.