diff --git a/init.el b/init.el index e0b613f..9fb4632 100644 --- a/init.el +++ b/init.el @@ -501,9 +501,13 @@ visual states." "Commands previously run with `my/project-run'") (defun my/project-get-root-dir () "Get the root dir for the current project" - (let ((proj (project-current nil))) - (or my/project-run-dir - (if proj (project-root proj) default-directory)))) + (let* ((proj (project-current nil)) + (default-directory (if proj + (project-root proj) + default-directory))) + (if my/project-run-dir + (expand-file-name my/project-run-dir) + default-directory))) (defun my/project-run (command comint) "Like `project-compile', but for running a project. COMMAND and COMINT are like `compile'."