Last active
August 29, 2015 14:08
-
-
Save juxtin/fc152680a04ceffb5338 to your computer and use it in GitHub Desktop.
Create a new Leiningen project in Emacs and open its project.clj file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun new-lein-project (name &optional template) | |
"Interactively ask for a project and optional template name, | |
then create a Leiningen project with the parameters | |
and open its project.clj file." | |
(interactive "sProject name: \nMTemplate (optional): ") | |
(shell-command-to-string | |
(concat "cd ~/src && " ;; change this to the directory where you keep your projects | |
"lein new " | |
template | |
" " name)) | |
(find-file (concat "~/src/" name "/project.clj"))) ;; change it here, too |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Caveat: I do not "know" elisp. There are probably at least 10 things here that can be done better.