emacs-run-command
emacs-run-command copied to clipboard
feat: integration with `friendly shell`
Summary
Make recipes more flexible and functional.
For example, if I need to make recipe python-run-file
, I am just create common recipe, and set run-command-run-method
to compilation mode, because I need to easy jump beetween errors and implementation.
For example, also I need to recipe python-interactively-run-file
, here I need to interactively output, but how I a use vterm
for this recipe (here compilation-mode
not fit, because it's block user's input)? Answer: I need to use anything command which run shell commands interactively and set :lisp-function
to it function.
This is very hard!
So, I am pull request this code.
Example of Usage
Here Implementation of python-run-file
:
(list
:command-name "python-run-file"
:type 'compile ; 'compile is type of recipe by default
; so, old recipes still work!
:command-line (format
"python -i \"%s\""
(buffer-file-name)))
Here Implementation of python-interactively-run-file
:
(list
:command-name "python-interactively-run-file"
:type 'interpreter
:command-line (format
"python -i \"%s\""
(buffer-file-name)))
Main Idea: each recipe must can select run method!
Notes
- Depends on
friendly-shell
Technical Debt
- May be delete dependency from
friendly-shell
- Add Documentation
- Disable :lisp-function, when experiments disabled
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Hi @semenInRussia, thanks for opening the PR and sorry for taking so much time to look at it.
I'd like to better understand the problem. If I got you right: sometimes you run commands that need interaction, and sometimes you run commands that don't need interaction but benefit from the error navigation provided by compilation-mode
. So you'd like a way to define when the emacs-run-command
buffer should be interactive, and when not. Is that right?
Yes. That's right!
Ok, I'm going to think about it as I also recently needed an interactive buffer. A solution would need to not rely on :lisp-function
or other experiments, and not introduce additional dependencies.
Ok
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Back off, bot!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Keep open.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@semenInRussia just a note to let you know that I haven't forgotten about this. I'm refactoring run-command to a better architecture and that will, among other things, make it straightforward to add command-specific runners in addition to a general, default runner.