Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Screen, tmux, et al. are great.

But here's another way of approaching the same problem:

Emacs can serve as a superlative terminal multiplexer if you're willing to give it a shot or if you're already an Emacs user, but do not want to use Emacs's TRAMP (remote editing) functionality:

1. Emacs can run as a server, so you can run it on your remote servers and connect to it with `emacsclient' via SSH. This has the added advantage that $EDITOR stuff will open in your active Emacs session if you want it to.

2. You can use Emacs's builtin shells or terminal emulators (and/or install vterm for a more faithful terminal emulation experience).

3. It is obviously a capable editor also, it goes without saying.

4. Windowing is better in Emacs than the other muxers, and more advanced. In terminal Emacs frames ("windows" everywhere else) serve as decent facsimiles for workspaces.

5. You can use tools like Magit for git management.

... plus all the other benefits of Emacs.

I still prefer TRAMP and GUI emacs, but terminal Emacs does have its own advantages.



I love Emacs but using it as a terminal sucks. Eshell is not a proper terminal emulator. Using it with programs that take control of the entire terminal window like less is janky. Stuff like ncurses based TUIs don't work at all.

Editing with TRAMP, on the other hand, is a pleasure.


There is a difference between plain shells (as in M-x shell and variants) and terminals (as in M-x vterm, or ansi-term) in Emacs. The former are essentially an infinite buffer without ncurses; the latter are full terminals with ncruses and a shell. Emacs calls the terminals of plain shells “dumb terminals”, to not raise any hopes. I personally love their infinte length and ability to edit them just like any other buffer. I typically have dozens to hundreds of shells but only few true terminals multiplexed in a long running Emacs session.


vterm works nicely. My only gripe that Evil support in vterm isn't great, but that's irrelevant in this context.



Somehow I knew what video that would be, before clicking the link.


All you say is true... But I still run emacs in screen :P

I know I should run a single emacs instances and use projectile or whatever to switch context, but for me it's just easier to run many screen sessions (with descriptive names via `screen -S my-session-name`, attaching via `screen -r my-session-name`) and an emacs instance for each screen session.

One day I'll improve my emacs-fu and I'll use a single emacs instance for everything.


I also prefer many Emacs instances. It simplifies some things like e.g. making Emacs packages aware of Python virtual environments if you can just run a separate Emacs instance per environment, instead of stuff like direnv.el.


> In terminal Emacs frames ("windows" everywhere else) serve as decent facsimiles for workspaces.

I would recommend enabling tab-bar-mode instead for this – it’s in Emacs core, and the tabs are really “numbered window configurations” that act very similarly to what screen/tmux calls “windows”.

I feel Emacs frames are in some ways more analogous to screen/tmux sessions.


I've been doing this with vim for several years since they added the terminal feature in vim version 8.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: