3 ms·
The phrase 'terminal emulator' is doing a lot of heavy lifting here. Async-shell-command might not technically be a 'terminal emulator', but the author is sure
by marcus0x62 3y ago
The phrase 'terminal emulator' is doing a lot of heavy lifting here. Async-shell-command might not technically be a 'terminal emulator', but the author is sure using it as one typically would use a 'terminal emulator'.
The article would make more sense if the author said 'you may not need an interactive shell. Here's how to use a pseudo-terminal-emulation mode in Emacs to launch commands without using a shell.'
- yakubin 3y agoThere is a significant difference between async-shell-command and terminal emulators in that the latter allow programs to manipulate emulator state via escape codes, positioning the cursor, clearing screen, resizing the draw area etc. I think terminal emulators are inferior to the Emacs experience. They often exhibit issues when you try to select and copy multiline text in e.g. irssi or vim, where you suddenly need the underlying program to be X-aware for that to work properly. If something uses ncurses, it’s pretty much guaranteed to be broken in one way or another and it doesn’t have any of the programmatic benefits traditionally associated with command-line programs (piping). Terminal emulators simply emulate an outdated UI paradigm. Emacs UI although not perfect is in a completely different league.
- marcus0x62 3y ago> There is a significant difference between async-shell-command and terminal emulators in that the latter allow programs to manipulate emulator state ... Hence why I said async-shell-command isn't technically a terminal emulator. It does, however, provide the same functional capability to launch a program, direct user input to it, and receive output from the program -- what most people are using terminal emulators for. The big difference, in the authors described workflow, is they are launching these commands on an ad-hoc basis, not from a semi-permanent shell. That, I would argue, is the biggest practical difference between what most people are doing and what the author is describing.
- ElectricalUnion 3y agoAuthor probaby should have used the name "ANSI escape terminal emulator" That being said the whole point of the thing is not avoiding the interactive shell either, is the fact that ANSI escape terminal emulators are in fact "too advanced" and "too interactive" and you might not want that. Those terminals execute pretty high level operations with the display in a complex in-band mechanism. What I like about the emacs buffer approach is that it approximates the IBM 3270 handling of terminals; still online and interactive, still can refresh screen every keypress "if you really really want", but the expected approach to interactivity is receiving and submitting a-whole-screen/a-whole-form of information at once.