diff --git a/emacs/.emacs.d/config/init-run-command.el b/emacs/.emacs.d/config/init-run-command.el index a25ed26..b5f36a2 100644 --- a/emacs/.emacs.d/config/init-run-command.el +++ b/emacs/.emacs.d/config/init-run-command.el @@ -39,9 +39,17 @@ (advice-add 'run-command :around #'run-command-advice) (advice-add 'run-command-core-run :around #'run-command-core-run-advice) + (defun run-command-runner-compile-comint (command-line _buffer-base-name output-buffer) + "Command runner that runs COMMAND-LINE in a comint buffer." + (with-current-buffer output-buffer + (compilation-mode) + (compilation-start command-line t) + (setq-local comint-process-echoes t))) + (defun run-command-with-runner (runner) (interactive (list (completing-read "Runner: " '(run-command-runner-compile + run-command-runner-compile-comint run-command-runner-vterm run-command-runner-term run-command-runner-eat)