From d3a2bcd6f521e7ca7456f7b33886b1613abedcd2 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 5 Sep 2024 06:18:59 -0600 Subject: [PATCH] Add run-command comint runner --- emacs/.emacs.d/config/init-run-command.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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)