This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-07
Channels
- # announcements (5)
- # asami (17)
- # aws (11)
- # babashka (67)
- # beginners (90)
- # calva (13)
- # cider (17)
- # circleci (6)
- # clj-kondo (3)
- # clojure (53)
- # clojure-europe (12)
- # clojure-france (8)
- # clojure-germany (3)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-norway (4)
- # clojure-spec (15)
- # clojure-uk (8)
- # clojurescript (41)
- # cursive (7)
- # data-science (6)
- # datomic (8)
- # emacs (10)
- # exercism (1)
- # figwheel-main (2)
- # fulcro (5)
- # graalvm-mobile (97)
- # graphql (1)
- # hyperfiddle (7)
- # inf-clojure (6)
- # interop (4)
- # introduce-yourself (5)
- # jobs (3)
- # kaocha (3)
- # malli (8)
- # meander (8)
- # music (3)
- # nrepl (7)
- # observability (1)
- # off-topic (45)
- # overtone (2)
- # polylith (63)
- # portal (2)
- # re-frame (26)
- # reveal (8)
- # ring (3)
- # shadow-cljs (56)
- # tools-build (5)
- # vim (11)
- # xtdb (8)
Hi folks. What’s the best way of setting inf-clojure-custom-repl-type
(which is a defcustom) locally?
Context: I have a custom command for starting clojure
projects and another one for cljs
. I’d like to set inf-clojure-custom-repl-type
in each of them.
What’s the most idiomatic way of doing that?
I tried to simply use let
but it complained about redefining a lexical var or something like that.
I suppose I can just setq
and override the value later, as needed, but if there’s a way of binding it locally, I’d rather use it.
i think you’d need to add some new functionality. It shouldn’t be too hard but it does get a bit verbose. My thinking is make a rebindable var for a custom repl type and then you could set it to whatever you need, and update the “get feature” type functions to look at the custom one when using a custom repl type
you should be able to reuse some stuff if it largely overlaps. (setq custom-thingy ...)
and get the one for clojure or clojurescript and assoc the things into it you need
I think I got your suggestion.
In any case, I search for occurrences of inf-clojure-custom-repl-type
in inf-clojure
. I just found it once in inf-clojure
, for binding the repl type, which gets stored in inf-clojure-repl-type
with setq-local
.
So I think it’s safe to set it with setq
in my custom commands, it’s not used internally after that anyway.