Open p2d0 opened 1 year ago
Thanks for the report, @p2d0 ! That commit looks unrelated and thus probably anterior to the one that introduced the difference. If you can bisect the issue down to the actual commit, I'm happy to look into this.
84520fe738f337607153b9cd37def2e4004eb3f6 seems to be the problem, default runner changed to term and it doesn't work with it
Works on the latest commit with
(setq run-command-default-runner 'run-command-runner-compile)
Except after e9420f1527dff8a65aeb36f8c0605ce8ad7cfb04 it spawns an extra window
and after db6e67bdbe216ef158786806aaceba1001d188fe it's a blank window
and after 477c42acce9e36ec59d18deaa73992f94faf7b99 it's a popup
84520fe seems to be the problem, default runner changed to term and it doesn't work with it
Strange, I'm using the term runner daily without issues. Does this happen also with basic examples like https://bard.github.io/emacs-run-command/quickstart#your-first-recipe or only with the dir-locals
recipe? Do you have one I could run on my side to try and reproduce this?
here's a basic example that works with compile runner but doesn't with term
docker run --name example1 -d busybox sh -c "while true; do echo Hello World; sleep 1; done"
(defun docker-example-recipe ()
(list
(list :command-name "pwd inside docker container"
;; should return /
;; but returns my home folder with term
:command-line "pwd"
:working-dir "/docker:example1:/"
)
)
)
With compilation runner With term
eat also works vterm doesn't (in this particular case)
Thanks @p2d0 for the repro, this helped a lot in understanding the problem.
It turns out that https://github.com/bard/emacs-run-command/commit/22844ae959ec66f609104d160a1a4e6bafa7af29 also didn't work when the runner was set to term
, so this is a limitation exposed by change in defaults rather than a regression.
This is probably related to running a command via TRAMP. compilation-mode
, being more Emacs-aware, probably does that correctly, while term-mode
doesn't.
Unfortunately I cannot at the moment dive into TRAMP to see if this could be made to work for term-mode
. I suggest you either (setq run-command-default-runner run-command-runner-compile)
if you're happy with running all commands in compilation-mode
, or you keep the default and set the runner on a per-recipe basis, e.g.:
(defun docker-example-recipe ()
(list
(list
:command-name "pwd inside docker container"
:command-line "pwd"
:working-dir "/docker:example1:/"
:runner 'run-command-runner-compile)))
You're welcome! I'm delighted that I could be of help. In the end, I opted for (setq run-command-default-runner 'run-command-runner-eat)
and it's working seamlessly on the master branch.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
should do but instead i get pinned package at 22844ae959ec for now