[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This package provides lightweight support for circular rings of window configurations. A window configuration is the layout of windows and associated buffers within a frame. There is always at least one configuration on the ring, the current configuration. You can create new configurations and cycle through the layouts in either direction. You can also delete configurations from the ring (except the last one of course!). Window configurations are named, and you can jump to and delete named configurations.
Window configuration rings are frame specific. That is, each frame has its own ring which can be cycled through independently of other frames.
You are always looking at the current window configuration for each frame,
which consists of the windows in the frame, the buffers in those windows, and
point in the current buffer. As you run commands such as C-x 4 b,
C-x 2, and C-x 0 you are modifying the current window
configuration. When you jump to a new configuration, the layout that existed
before the jump is captured, and the ring is rotated to the selected
configuration. Window configurations are captured with
current-window-configuration
, however winring also saves point for the
current buffer.
To use, add the following to your initialization file:
(winring-initialize) |
Note that by default, this binds the winring keymap to the C-x 7
prefix, but you can change this by setting the value of
winring-keymap-prefix
, before you call winring-initialize
.
The following commands are defined:
Create a new window configuration. The new configuration will contain a
single buffer, the one named in the variable
winring-new-config-buffer-name
.
With C-u, winring prompts for the name of the new configuration. If
you don't use C-u the function in winring-name-generator
will be
called to get the new configuration's name.
Create a duplicate of the current window configuration. C-u has the same semantics as with C-x 7 c.
Jump to a named configuration (prompts for the name).
Kill the current window configuration and rotate to the previous layout on the ring. You cannot delete the last configuration in the ring. With C-u, prompts for the name of the configuration to kill.
Go to the next configuration on the ring.
Go to the previous configuration on the ring.
Note that the sequence `C-x 7 o C-x 7 p' is a no-op; it leaves you in the same configuration you were in before the sequence.
Rename the current window configuration.
Submit a bug report on winring.
Echo the winring version.
As mentioned, window configuration names can be displayed in the modeline.
The default value of winring-show-names
is currently nil
by
default. Set it to t
to activate. If you don't like the position in
the modeline where winring names are shown, you can change this by passing in
your own modeline hacker function to winring-initialize
.
10.1 History | ||
10.2 Related Packages |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A long long time ago there was a package called `wicos' written by Heikki Suopanki, which was based on yet another earlier package called `screens' also written by Suopanki. This in turn was based on the Unix tty session manager `screen' (unrelated to Emacs) by Oliver Laumann, Juergen Weigert, and Michael Schroeder.
Wicos essentially provided fancy handling for window configurations. I liked the basic ideas, but wicos broke with later versions of Emacs and XEmacs. I re-implemented just the functionality I wanted, simplifying things in the process, and porting the code to run with XEmacs 19 and 20, and Emacs 20 (I don't know if winring works in Emacs 19.34).
Wicos used the M-o prefix which I've recently changed to C-x 7 as the default, by suggestion of RMS. Wicos also had some support for multiple frames, and saving configurations on all visible frames, but it didn't work too well, and I like frame independent rings better.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
I know of a few other related packages:
`escreen' by Noah Friedman. A much more ambitious package that does Emacs window session management. Very cool, but I wanted something more lightweight.
`wconfig' by Bob Weiner as part of Hyperbole. I think wconfig is similar in spirit to winring; it seems to have also have named window configurations, but not frame-specific window rings.
`winner' by Ivar Rummelhoff. This package comes with Emacs 20, and appears to differ from winring by providing undo/redo semantics to window configuration changes. winner is a minor mode and does seem to support frame-specific window rings.
window-xemacs' by the XEmacs Development Team. It appears that this package, which is specific to XEmacs (and perhaps just XEmacs 20) implements stacks of window configurations which are frame independent.
Please feel free to email me if my rendition of history, or my explanation of the related packages, is inaccurate.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.