space-tree: Workspace Management Trees in Emacs | Charlie Holland's Blog
Skip to main content<br>space-tree: Workspace Management Trees in Emacs<br>space-tree: Workspace Management Trees in Emacs<br>May 27, 2026
© 2026 Charlie Holland
space-tree: Workspace Management Trees in Emacs
space-tree: Workspace Management Trees in Emacs
Table of Contents
1. TLDR tldr
2. About emacs workspaceManagement tooling
3. Demo
4. The workspace, an old idea workspaceManagement
5. Workspaces in Emacs emacs comparison
6. My needs, plainly stated workspaceManagement
6.1. Arbitrary depth, not arbitrary width
6.2. No naming tax
6.3. No mandatory persistence
6.4. No workspace scoping
6.5. Built on what's already there
7. Cognitive Psychology: Why Nesting Works cognitivePsychology workspaceManagement
7.1. The working-memory ceiling
7.2. Chunking is how experts cheat
7.3. Hierarchical organization directly improves recall
7.4. Complex work is already hierarchical
7.5. Cognitive Load Theory names the cost
7.6. Hierarchies match the workspace management use case
8. The field, at a glance emacs comparison
9. How space-tree works emacs dataStructures
9.1. What you do with it
10. What space-tree Doesn't Do emacs tooling
11. Getting started emacs installation
1. TLDR tldr
space-tree is a tree-based workspace manager for Emacs. Workspaces are a battle-tested UX concept across operating systems, but in Emacs and most OSes alike, they're flat: you get a row, a grid, or a numbered list, but never a workspace inside a workspace. My requirements for a workspace manager were arbitrary-depth nesting, no naming tax, no mandatory persistence, no per-workspace buffer scoping, and a build that leans on Emacs's existing window-state primitives. The cognitive-psychology case for hierarchical organization turns out to be unusually robust: working-memory ceilings (Cowan 2001), expert chunking (Chase & Simon 1973), and direct gains in recall (Bower et al. 1969) all support the idea that a user-authored tree is easier to hold in mind than the same work flattened into a list. The feature matrix places space-tree as the only workspace manager in this survey with arbitrary-depth structure, optional naming, and a deliberately session-only memory model. The implementation is a small amount of Elisp built on window-state-get / window-state-put, with a nested hash table for the tree shape, a flat hash table for window-state snapshots, and a sparse hash table for optional names. Getting started is a use-package block plus a Super-key keymap.
2. About emacs workspaceManagement tooling
Figure 1: JPEG produced with OpenAI gpt-image-1
When we use our computers, the vagaries of day-to-day activities fill our displays with an unbounded number of applications. The chaos here has led to an overwhelming number of 'workspace management' tools.
I see these tools pop up everywhere in my daily computer use. macOS and Windows have workspace management solutions out-of-the-box. Linux has the venerable i3 (and btw, Aerospace is a great alternative for macOS users).
We see these solutions pop up even at the application level. Web browsers have tab-groups, and some, like Vivaldi 💜, even have first-class workspaces. Most complex applications like browsers, IDEs, DAWs, and image-manipulation programs also offer workspace management at the 'frame' level, where each visible frame is typically scoped to one or a set of projects.
Even AR devices (I'm looking at you Apple Vision Pro), offer workspace management, albeit in a hilariously silly way: the advent of AR technology has enabled you to misplace applications all around your house. You might leave your Chef in the kitchen, your CouchDB on the sofa, your Brew in the beer fridge, or (worst of all) your git porcelain in the bathroom.
Of course, Emacs offers several workspace management tools. Besides the built-in tab-bar, there is a delicious cornucopia of 3rd party solutions (7 of which are discussed here). When you think about it, robust workspace management is more important in Emacs than anywhere else, especially for those of us who try to stuff the kitchen sink in there. The more concerns being handled by Emacs, the greater the burden on organizing and navigating those concerns. But most of Emacs's native and 3rd party solutions lack the ability to organize workspaces hierarchically.
Although I'm typically against hierarchical organization, for workspaces management I think it makes perfect sense. After all, workspace management tools are providing some digital simile for how we might organize things in the physical realm.
Think about how you organize things in your dwelling: a house has rooms, rooms have shelves, shelves have drawers. If you've ever heard the name 'Marie Kondo', then you have likely embraced that drawers too can have dividers. These can be commandeered for smaller drawer-within-a-drawer spaces the moment your proliferation of joyful treasures warrants a...