szermatt / mistty

Shell/Comint alternative with a fully functional terminal for Emacs 29.1 and later.
GNU General Public License v3.0
102 stars 5 forks source link

Feature request: add a mode that seamlessly integrates `mistty` with `eshell` #16

Open hab25 opened 10 months ago

hab25 commented 10 months ago

Like eat's eat-eshell-mode, which AFAIU creates a temporary eat terminal on every RET in an eshell buffer (which invokes eshell-send-input by default).

This would allow me to completely substitute eat with mistty, except for the probably unimportant fact that it seems eat can grant a performance increase while avoiding flickering.

szermatt commented 10 months ago

What would using mistty instead of eat for eshell mode bring, in terms of features? I haven't used eshell much, but it seems that it would, like mistty, already give you access to all Emacs and shell editing tools, since eshell is written in elisp.

I'm currently working on having mistty work on eat instead of just term.el. This is tricky, but if I manage to get it to work, we'd end up with both mistty in eshell and a better, non-flickering, terminal.

hab25 commented 10 months ago

What would using mistty instead of eat for eshell mode bring, in terms of features?

It would allow one to have Emacs editing features, as well as the mistty feature of all rendering being done by the shell through the terminal, while using, from an eshell buffer, a program that needs a terminal to read input and/or display output properly.

N.b., even if eat were to implement https://codeberg.org/akib/emacs-eat/issues/121, that would still not have the mistty feature of all rendering being done by the shell through the terminal.

An example of a program that needs a terminal to read input and/or display output properly is python (mentioned in mistty README) which invokes python's REPL. After invoking that from eat-eshell-mode, one can press <up> to have the current command line become the command line that was previously fed into the REPL. However, in contrast to the hypothetical scenario where mistty was being used instead of eat here, while the REPL is running one doesn't have access to Emacs editing features or the mistty feature of all rendering being done by the shell through the terminal.

I'm currently working on having mistty work on eat instead of just term.el. This is tricky, but if I manage to get it to work, we'd end up with both mistty in eshell and a better, non-flickering, terminal.

Awesome.


I could be misunderstanding something about mistty; please let me know if so.

hab25 commented 10 months ago

I haven't used eshell much, but it seems that it would, like mistty, already give you access to all Emacs and shell editing tools, since eshell is written in elisp.

This highlight from the Eshell manual may be useful.

szermatt commented 10 months ago

Thank you for the explanation. Yes, I see that mistty could help if you launch a command that takes input from a terminal.