4 ms·
I don't know why the author doesn't simply open a shell buffer in emacs, but that's their business. Piece of fun trivia: EMACS used to have a mode for use on a
by gumby 3y ago
I don't know why the author doesn't simply open a shell buffer in emacs, but that's their business.
Piece of fun trivia: EMACS used to have a mode for use on a printing terminal. It worked, as long as you had an idea of what your file looked like, same as any other non-visual editor (like ed before a display mode was grafted onto it to form vi). Of course this was as crazy as using vi on a printing terminal, since EMACS started out as an easier way to use TECO after a visual mode had been added to that. I guess the printing mode was worth it for EMACS users who never learned TECO.
More usefully it had a "slow terminal" mode. Printing terminals were slow, but many people connected to computers at 300 baud or even slower! So in slow terminal mode you could use the full display power of EMACS but it was very selective about how it updated your display. Back then most terminals had very limited cursor control, and you couldn't always change an arbitrary character. Still, avoiding a full screen repaint at 110 baud was a win.
I doubt either of these modes survived the relatively recent (1980s) ports of emacs (as it is now known) to C/Lisp. But a special line for single-line editing through an emacsclient could be a win in this case.
- teddyh 3y agoFrom the Emacs manual: Searching incrementally on slow terminals, such as displays connected to remote machines over slow connection, could be annoying due to the need to redraw large portions of the display as the search proceeds. Emacs provides a special display mode for slow terminals, whereby search pops up a separate small window and displays the text surrounding the match in that window. — <https://www.gnu.org/software/emacs/manual/html_node/emacs/Search-Customizations.html#index-search-display-on-slow-terminals https://www.gnu.org/software/emacs/manual/html_node/emacs/Se...>
- gumby 3y agoNice! That a bit more advanced: old school EMACS used the line below the mode line because some old terminals supported update only there and not always elsewhere.
- m463 3y agopersonally I don't use shell buffer because it doesn't do command line recall like I expect. In a normal terminal control-r <characters> recalls the last command with those keys, and control-p/n will go back/forward in the history. with the shell buffer I move upwards in the buffer to recall a command. (is there a way to configure this differently?) EDIT: ok it seems like meta-r and meta-p/n do the same thing - kind of. hmmm, but meta-r doesn't seem to recall from the shell history? It is either a different history or truncated.
- earthscienceman 3y agoFYI, I use vterm with a few custom keys so that it operates exactly as if it were just a standard terminal emulator.
- gumby 3y agoWhy bother? Real question — seems like no advantage over a terminal window, except you can c-x b to it. Perhaps that's enough?
- earthscienceman 3y agoUmmm. It probably depends on the kind of work you do in the terminal but for me it was a game changer. Being able to pull in any of the text from a terminal into a buffer, easily, without copy paste or mouse is a massive game changer for the type of work I do. I can operate on any of the text in the terminal the same way I would emacs, and pull it into a code buffer. Selectively pulling in random long directory paths, etc etc. I can also drop anything from notes or code into a terminal without needing to dance around. It also turns emacs (server-mode) into a really great replacement for tmux/screen. tmux behaves very strangely in how it instantiates the very first window, calling the process after that window and killing that window can kill all your tmux sessions. I run emacs as a daemon on my HPC clusters and have it monitor jobs and more via vterm.
- gumby 3y ago