Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reloading a ns in repl

Tags:

emacs

clojure

Lets say I have a code file that has the ns - (ns abc.a). Now I start my repl and am in the ns- (use-ns 'abc.a).

Now if I change any code in the file, how do I get to reload the ns in the repl?

Thanks, Murtaza

like image 363
murtaza52 Avatar asked Mar 06 '26 08:03

murtaza52


2 Answers

You can hot reload the code with (require :reload 'abc.a) or (require :reload-all 'abc.a). The latter also reloads all the required namespaces of abc.a while the former only reloads abc.a.

like image 70
kotarak Avatar answered Mar 07 '26 22:03

kotarak


You can use load-file to reload the file.

like image 39
Ankur Avatar answered Mar 07 '26 21:03

Ankur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!