how can I write a function in .emacs to run "lein -m clojure.main " <some path>
I mean, "lein run -m clojure.main" <some path>
You can add your own functions with
defun either right in your
init.el or in independent files that you load in your init.