Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Reload files upon save when using swank+leiningen+emacs

Tags:

I'm looking to set up slime+lein-swank to reload source files referenced from the repl when i save the file. currently i do this:

  • edit file
  • save file
  • switch to repl
  • (use :reload-all 'com.package.namespace)
  • test stuff

I want to not have to remember to do step 4.

like image 990
Arthur Ulfeldt Avatar asked Apr 07 '10 21:04

Arthur Ulfeldt


1 Answers

You can use SLIME's C-c C-k before switching to the REPL, for slime-compile-and-load-file. It will prompt you to save the file if you haven't already. When it's done, the things which you've redefined should be available at the SLIME REPL in their new versions. Then you could use C-c C-z to bring up the REPL (close it with C-x 0 when you don't need it anymore).

like image 185
Michał Marczyk Avatar answered Oct 24 '22 07:10

Michał Marczyk