emacs-run-command icon indicating copy to clipboard operation
emacs-run-command copied to clipboard

feat: integration with `friendly shell`

Open semenInRussia opened this issue 3 years ago • 11 comments

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

semenInRussia avatar Feb 08 '22 18:02 semenInRussia

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Mar 11 '22 04:03 stale[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.

stale[bot] avatar Apr 17 '22 14:04 stale[bot]

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?

bard avatar Apr 17 '22 14:04 bard

Yes. That's right!

semenInRussia avatar Apr 17 '22 15:04 semenInRussia

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.

bard avatar Apr 17 '22 17:04 bard

Ok

semenInRussia avatar Apr 20 '22 16:04 semenInRussia

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar May 25 '22 21:05 stale[bot]

Back off, bot!

bard avatar May 26 '22 09:05 bard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jun 27 '22 19:06 stale[bot]

Keep open.

bard avatar Jun 27 '22 22:06 bard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jul 30 '22 19:07 stale[bot]

@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.

bard avatar Jan 09 '23 11:01 bard