I would like to recompile my project in the background with a single key press. I am using a function like this:
(defun my/recompile-quietly () "Re-compile without changing the window configuration." (interactive) (save-window-excursion (recompile)))
which I bind to a key. The problem is, that the recompile command does not necessarily know the compile command, defaulting to
make -k, which is wrong in general. I can use
projectile-compile-project to have projectile suggest and set a compilation command (which is usually correct). However, the compilation command is set file-local (I think), rather than project-local.
Is there a
projectile-recompile command that I can use as in the above snippet, i.e. a command that prompts for the compile command (possibly with a default suggestion based on the project type), sets the command project-wide and recompiles without any prompts afterwards?