-
Notifications
You must be signed in to change notification settings - Fork 23
Home
Table of Contents
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 windows. 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 kind 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 'window-purpose)
Purpose makes Emacs aware of purposes when deciding where to display a buffer, and provides a handful of useful commands. See Usage and Keys & Commands.
You can configure what purposes Purpose recognizes. See Purpose Configuration.
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 and Writing Extensions.
For an explanation of how Purpose works inside, see Internals.
Contributions of any kind are always welcome, from the tiniest to the largest. There are several ways you can help Purpose:
-
Tell your friends
-
Report bugs: If you find any bugs, or think Purpose doesn't behave right or as expected, please open an issue report on GitHub.
-
Ideas for improvement: If you have an idea that would improve Purpose, feel free to open an issue report on GitHub as well, and label it as "idea".
-
Share your experience: If you find a cool use for Purpose, or discover a package that works well with it, you can spread the word. You can also send me an email and it might end up in the wiki.
-
Write code: You can fix bugs in Purpose or add improvements of your own - send me a pull request and I will consider it (can't promise, though).
-
Write extensions: You are very welcome to write extensions that use Purpose to display some special buffers, or otherwise extend Purpose's capabilities (for example, an Imenu buffer that updates automatically). If you'd like, I could add your extensions to the extensions directory.
-
Use Purpose in your packages: If you're an author of a package that uses Purpose, please let me know. It would make my day. Also, if something in Purpose prevents you from using it, write me and maybe a solution can be worked out.