-
Notifications
You must be signed in to change notification settings - Fork 23
Home
Purpose offers a new way to manage the display of windows and buffers, and was originally inspired by E2WM.
Once upon a time, I worked on some parts of a large project. I found myself using all kinds of buffers - python files, python interpreter, bash terminal, grep, dired, ibuffer. When I navigated the code, Emacs opened all sorts of buffers in all sorts of windows, and when I finally discovered what variable or function I needed, the window layout was messed up and I had to look for the original file I was working on.
What I was missing was a way to limit which buffers can be displayed in which window. E2WM helped me somewhat, but wasn't flexible enough. Enter Purpose.
What Purpose does, is assign a purpose to each window and each buffer. This way, any window can display only a certain kinds of buffers. Also, Purpose lets the user decide which windows can be used for any purpose, and which windows should stick to one purpose.
What this all should mean, if Purpose is successful, is less time spent fighting Emacs over the window layout and where to display buffers, a pleasant user experience and more time for fun or important work.
Purpose is not meant to be as extensive as E2WM. It has three main goals:
-
provide an easy and reliable way for the user to maintain a consistent window layout
-
provide a framework for extensions that make use of the window layout
-
hopefully, be a step towards IDE-like packages in the future (seriously)
Purpose is available at MELPA, so you should install it with Emacs' package manager.
To turn on Purpose manually, open Emacs and type the command M-x purpose-mode
.
To turn on Purpose automatically when Emacs starts, add the following line to your init file:
(purpose-mode)
If you prefer to download Purpose straight from GitHub, add this to your init file (before calling purpose-mode
):
(add-to-list `load-path "/path/to/purpose")
(require 'purpose)
Purpose makes Emacs aware of purposes when deciding where to display a buffer, and provides a handful of useful commands. See Usage.
You can configure what purposes Purpose recognizes. See Purpose Configuraion.
Purpose is designed to be easily extended, both for the benefit of users and in the hope of enabling flexible window management for IDE-like packages. See Extensions.
For an explanation of how Purpose works inside, see Internals.