[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Project.el - running processes in root
From: |
Theodor Thornhill |
Subject: |
Project.el - running processes in root |
Date: |
Thu, 04 Jun 2020 21:53:33 +0000 |
Hello!
What is the best way to run a subprocess in root of a project currently?
Right now I've made a small convenience macro for this:
(defmacro with-project-root (&rest body)
"Dynamically bind default directory to project root."
(declare (debug t) (indent 0))
`(let ((default-directory (project-root (project-current))))
,@body))
Then I can:
(defun elm-repl ()
"Create a new buffer with Elm repl started and switch to it."
(interactive)
(with-project-root
(switch-to-buffer-other-window
(make-comint "Elm Repl" "elm" nil "repl"))))
This seems like a nice solution, but if there already exists something like
this, please tell. Otherwise, would this be something appropriate for
project.el to expose?
Have a nice day,
Theo
- Project.el - running processes in root,
Theodor Thornhill <=