I have a leiningen project set up. In one of the clojure source files I've defined some records. My workflow is to usually start emacs and connect to a 'lein swank' REPL. Once I've connected to the REPL I switch into the appropriate namespace and C-c C-k a file, so I can start working with the REPL and the code in the file. However, if I make changes to the records in that file and C-c C-k it, the REPL doesn't pick up the changes.
So, as it stands, every time I need to make changes to a record, I have to stop the lein swank process, restart it, and reconnect to it from emacs. This is getting old very fast. What am I missing? I've tried C-c C-l instead of C-c C-k, but that doesn't work. I've tried deleting the 'class' dir in the project root, but that's also a no-go.
I'd appreciate any insights or recommendations.
Also, as an aside, I'm always working in the namespace where the records are defined.
Edit: I'm actually changing the implementation of a protocol in the defrecord. Once I change it and compile using C-c C-k, and create a new record in the REPL, the REPL is still using the old protocol implementation.
C-c C-cto compile individual toplevel forms. By the way, there isC-c ~to switch package and directory of the REPL to the current file and point. - Svante