Thanks to EXWM (not mentioned here), emacs has been my literal X window manager for several years. I installed it as a lark, thinking there's no way this will work properly, and just never stopped using it. It's brilliant.
You can also use EXWM in Xephyr, so you can have an emacs window with its own controlled windows instead of replacing the whole DE/window-manager. I suppose this doesn't work with multiple frames though.
I have been experimenting with xdotool windowmap/windowunmap and override_redirect (and maybe LD_PRELOAD?) to try get something like EXWM to work without creating another X server, by capturing windows. I'm doing this in vim though.
Ratpoison seems like one of those pieces of software that you can release without it bitrotting. The manpage also was very comprehensive from what I remember, though I haven't used Ratpoison in a number of years. I wouldn't worry about it breaking or being hard to understand.
Nowadays there's eat as excellent terminal emulator for emacs, which should replace the need to run external terminals.
I've been using it for a w while, and recently finally got fed up about terminals on my macbook not behaving as nicely as the ones on my linux box with proper tiling window managers, so spent some effort to make SSH into a terminal with completion easy from emacs, and now mostly handle terminals in emacs.
I've been an ansi-term user for years (at least on unices, including Cygwin -- if I am forced to use vanilla w32 emacs without a *nix underneath, I will use eshell since I can do more in elisp-land without relying on the shitshow of Windows CLI utils). What are the benefits of eat vs ansi-term, in your opinion?
With Debian as VM this would probably much leaner. Was shocked about current Ubuntu image sizes. E.g. no need to have to download about 500MB of firmware packages with each new kernel.
Was just looking at this article yesterday and it inspired me to try it myself. Trying it out today, my fingers became really sore from trying to navigate. Can't imagine using this for a modern development workflow where there's a lot of jumping around. To make it more ergonomic, I'd just be recreating configuration other window managers give me out of the box.
The author mentions in the footnotes he mostly uses this setup for note taking. That makes sense as he probably remains in one window for extended periods of time.
There is a third option besides replacing your window manager with EXWM or a simpler tiling window manager: to manage desktop windows from within Emacs using your existing X11 window manager or Wayland compositor. This means
- you can position and resize all desktop windows,
- you can switch between Emacs and desktop windows by moving to the left, right, up, down window and
- you can switch back and forth between a named desktop app like Firefox, okular etc. and Emacs.
You need to install just the Emacs package Emacs Desktop Window Manager (dwin) https://github.com/lsth/dwin, for example from MELPA. Currently it works with X11 window managers as well as with KDE/KWin on Wayland or X11 (using xdotool and kdotool, resp.). I am using it all day myself on KDE/KWin Wayland in my standard setup and there it works fine.
I knew someone who ran it with inittab about 3 decades ago, and I very much doubt they were the only one. Emacs could be used as a full-blown OS long ago. It just depends on your needs.
Also, the psychotherapist was one of a kind ;)
Personally, I could live with tmux or zellij as PID 1. Because from there I can do everything, except GUI. Might as well use Sway then to achieve virtually the same.
Everything in Emacs exists under the “M-x” keybind (M stands for Meta which is usually Alt on linux and Option on macOS). Because everything you can do is a command (which are just normal functions that have been annotated). Then you have bindings to directly execute those functions instead of going through a prompt.
There’s some terminology to learn to make sense of the commands. And the default keybindings are also useful to learn (and you can find them in anything that uses the readline library and equivalent: Bash, zsh, psql,…. You can also find them in macOS text widgets).
But the thing is that Emacs have a lot of commands. They are assembled into packages and due to the nature of Elisp, can be edited and patched live. While it easy to get started (videos on youtube, the emacs documentation, the “Mastering Emacs” book), After a while, you config can become alien to anyone else. But it will stay discoverable as Emacs have a great help system.
The key bindings are sort of the least impactful idea behind the editor. The defaults are indeed ancient and opinionated, and don't match well with what other environments ended up adopting. They do work well for the most part if you want to take the time to learn them, though. But everyone has their own set of customizations[1], usually going along with a preferred set of physical key remappings[2]. Lots of folks use modes like Evil to get vi bindings, etc...
The point is to think hard about how you use the editor and start working on making the editor work the way you need it to. Binding fluency will fall out naturally.
[1] For myself, I'm mostly default. But for example I dislike the defaults for C-t and C-z which IMHO are footguns, and remap those to "top/end of buffer", functions I do use a lot and whose defaults are clumsy.
[2] Ctrl to the left of A, obviously. But also the key below '/' really wants to be Meta and not whatever else the manufacturer put there.
I think the most straightforward way to a solid Emacs config is to use emacs-bedrock [1]. It's a very well curated set of packages that enhance the basic experience. It does leave you with plenty of room to fiddle, which is the beauty of Emacs to my mind. I personally use doom because I built my config on it for years, and am happy with my current setup, but if I started again I would go with emacs-bedrock to keep it more minimal.
A VM is displayed as a window on the host OS and Emacs is the window manager within that VM window. What's the difference from running emacs directly as an application on the host?
"However, I also don’t like to carry two computers just to jot down personal notes. My remedy is to install a virtualization system and create a “personal” virtual machine."
I have the same problem, but I'm not sure if a VM is a good solution. The work OS has full access to the VM and I don't trust putting my personal things even in the VM. (I consider the work laptop backdoored and full with spyware.)
Why bother with a VM? When I'm in that situation, I just run my stuff in the cloud and ssh to my machine, alternatively, ssh to my machine at home. Much more minimalist and light weight than a VM as long as your customer allows outgoing ssh and/or connections to a tor/i2p hidden service.
If I'm just jotting down personal notes, I use a pen and a notepad. If I need to transcribe anything into my long-term notes, then I can do that at the end of the day/week/whatever, when I review what I wrote down.
Active exwm user here: I've been using EXWM for one ~1,5-2 years now, and I've configured it pretty much the same way I would love to have the ideal desktop to look like. Minimal, clean, mostly 1 app to focus on, and only 6 virtual desktops I really use.
I struggled quite a bit with the xinit ath the start, and I had to switch to other terminals to get back to any UI. But now I have a pretty consistently well-running EXWM, only from time to time (once a month) it freezes. Most of the time, because I quickly want to do sth. Mess up pressing multiple wrong key combinations and am stuck with a frozen ui :D
For login I use lightdm, that will then load emacs.
What my key pain points still are:
- char and line mode
Switching between them is easy, but having different modes, in different buffers can still sometimes mess up with my keys. Esp. when pressing Ctrl-q for escaping, just to realize that this is in line mode, and closing the window, instead of staring a actual sequence, like C-q C-y.
Also, when coing through my buffer list, while having the preview active. So in buffer list, use C-n, and when the preview then shows a buffer, that is in line mode, that will capture the focus, and the next C-n will be send to the buffer, instead of the buffer list. Leaving me with a open buffer list in the minibuffer, that I have to manually close.
- some webpages e.g. payment providers open up a popup for confirming. From time to time, this popup is
- in the background somehwhere
- or floating
- or not findable at all, even in my buffer list
This is rare, but it happens. And when it happens, it's very annoying to interact with it
- when altering my emacs init config, and rebooting, and I messed things up. Then there is no way other than switching to tty1 and roll back the changes. Though I guess I could change that, through having some kind of check before saving.
- Not a pain point, but I still haven't gotten to the part of using it with multiple monitors. Looking at the config I always say that "I'll do it soon" >D
But overall happy!
And thanks to howardism.org for all the wonderfull great emacs write-ups he has.
My all time fav. is still the Literate DevOps article, to which I came back often in the past. And now that I think about it, I should re-read it! Thanks Howard!
Having a Lisp system to control your WM/compositor is amazingly empowering, being able to just write some expressions in a buffer and evaluate them on the fly to command windows, apps, keybindings, various settings from sound and display (e.g., color temp) to bluetooth, etc. is crazy awesome.
Once you have that taste of freedom - there's no going back. The traditional way of "write, save, reload/restart" would feel so clunky, annoying and stupid.
And you can absolutely do this as long your WM supports some kind of IPC. I'm slowly building my Hyprland config in Clojure using babashka. I wish I could share it publicly, but it's still in early experimental stage - too messy, too opinionated, there are some bugs, and I still may decide to switch to Janet, CL, nbb or some other Lisp option, I'm glad we have numerous options to choose from.
For anyone interested in doing something similar, I highly recommend making the last program in your .xinitrc be a terminal emulator rather than Emacs, that way if Emacs crashes, your other windows will persist.
44 comments
[ 5.0 ms ] story [ 64.4 ms ] threadI have been experimenting with xdotool windowmap/windowunmap and override_redirect (and maybe LD_PRELOAD?) to try get something like EXWM to work without creating another X server, by capturing windows. I'm doing this in vim though.
By the way, neovim has an apparently working EXWM-like plugin, NXWM/nwm: https://github.com/altermo/nwm
Is there a live release/support/discussion ecosystem for ratpoison in 2025 ?
I've been using it for a w while, and recently finally got fed up about terminals on my macbook not behaving as nicely as the ones on my linux box with proper tiling window managers, so spent some effort to make SSH into a terminal with completion easy from emacs, and now mostly handle terminals in emacs.
This matters a lot to me because the proprietary build/test tool at work likes to dump the stack trace for every failing unit test.
To the eyes of his employer installing a personal VM is probably exactly the same.
The author mentions in the footnotes he mostly uses this setup for note taking. That makes sense as he probably remains in one window for extended periods of time.
GUIX, EXWM, and Emacs are home for now :)
You need to install just the Emacs package Emacs Desktop Window Manager (dwin) https://github.com/lsth/dwin, for example from MELPA. Currently it works with X11 window managers as well as with KDE/KWin on Wayland or X11 (using xdotool and kdotool, resp.). I am using it all day myself on KDE/KWin Wayland in my standard setup and there it works fine.
(I am the author.)
Also, the psychotherapist was one of a kind ;)
Personally, I could live with tmux or zellij as PID 1. Because from there I can do everything, except GUI. Might as well use Sway then to achieve virtually the same.
https://web.archive.org/web/20041030060909/http://www.inform...
http://informatimago.free.fr/i/linux/emacs-on-user-mode-linu...
That said, i did not give it a fair shot. Does anyone have any good resources to get started? E.g lazygit has a good 15min vid to get u up to speed
There’s some terminology to learn to make sense of the commands. And the default keybindings are also useful to learn (and you can find them in anything that uses the readline library and equivalent: Bash, zsh, psql,…. You can also find them in macOS text widgets).
But the thing is that Emacs have a lot of commands. They are assembled into packages and due to the nature of Elisp, can be edited and patched live. While it easy to get started (videos on youtube, the emacs documentation, the “Mastering Emacs” book), After a while, you config can become alien to anyone else. But it will stay discoverable as Emacs have a great help system.
The key bindings are sort of the least impactful idea behind the editor. The defaults are indeed ancient and opinionated, and don't match well with what other environments ended up adopting. They do work well for the most part if you want to take the time to learn them, though. But everyone has their own set of customizations[1], usually going along with a preferred set of physical key remappings[2]. Lots of folks use modes like Evil to get vi bindings, etc...
The point is to think hard about how you use the editor and start working on making the editor work the way you need it to. Binding fluency will fall out naturally.
[1] For myself, I'm mostly default. But for example I dislike the defaults for C-t and C-z which IMHO are footguns, and remap those to "top/end of buffer", functions I do use a lot and whose defaults are clumsy.
[2] Ctrl to the left of A, obviously. But also the key below '/' really wants to be Meta and not whatever else the manufacturer put there.
Doom Emacs install from scratch takes less than that.
[1] https://codeberg.org/ashton314/emacs-bedrock
I have the same problem, but I'm not sure if a VM is a good solution. The work OS has full access to the VM and I don't trust putting my personal things even in the VM. (I consider the work laptop backdoored and full with spyware.)
I struggled quite a bit with the xinit ath the start, and I had to switch to other terminals to get back to any UI. But now I have a pretty consistently well-running EXWM, only from time to time (once a month) it freezes. Most of the time, because I quickly want to do sth. Mess up pressing multiple wrong key combinations and am stuck with a frozen ui :D For login I use lightdm, that will then load emacs.
What my key pain points still are:
- char and line mode Switching between them is easy, but having different modes, in different buffers can still sometimes mess up with my keys. Esp. when pressing Ctrl-q for escaping, just to realize that this is in line mode, and closing the window, instead of staring a actual sequence, like C-q C-y. Also, when coing through my buffer list, while having the preview active. So in buffer list, use C-n, and when the preview then shows a buffer, that is in line mode, that will capture the focus, and the next C-n will be send to the buffer, instead of the buffer list. Leaving me with a open buffer list in the minibuffer, that I have to manually close.
- some webpages e.g. payment providers open up a popup for confirming. From time to time, this popup is - in the background somehwhere - or floating - or not findable at all, even in my buffer list This is rare, but it happens. And when it happens, it's very annoying to interact with it
- when altering my emacs init config, and rebooting, and I messed things up. Then there is no way other than switching to tty1 and roll back the changes. Though I guess I could change that, through having some kind of check before saving.
- Not a pain point, but I still haven't gotten to the part of using it with multiple monitors. Looking at the config I always say that "I'll do it soon" >D
But overall happy! And thanks to howardism.org for all the wonderfull great emacs write-ups he has. My all time fav. is still the Literate DevOps article, to which I came back often in the past. And now that I think about it, I should re-read it! Thanks Howard!
Once you have that taste of freedom - there's no going back. The traditional way of "write, save, reload/restart" would feel so clunky, annoying and stupid.
And you can absolutely do this as long your WM supports some kind of IPC. I'm slowly building my Hyprland config in Clojure using babashka. I wish I could share it publicly, but it's still in early experimental stage - too messy, too opinionated, there are some bugs, and I still may decide to switch to Janet, CL, nbb or some other Lisp option, I'm glad we have numerous options to choose from.
Something like: