Emacs: Effective Windows Management

By Xah Lee. Date: . Last updated: .

there are 2 major to work with windows in emacs with large monitor.

Full Screen, vs Multiple Windows.

Full Screen Emacs Workflow

recently, Jon Snader (aka jcs) mentioned ace-windows mode, see: http://irreal.org/blog/?p=2699.

Ace Windows is at https://github.com/abo-abo/ace-window

The ace windows mode lets you quickly move cursor to the split pane you want. When invoked, it displays a letter in each split pane, and pressing that key moves you into that pane.

xah emacs screenshot 2014-03-06
full screen emacs with split panes.

meh.

the full-screen workflow is not good because:

there are various packages that help you “reset” your windows config. But they just add more work to your fingers.

[see Emacs: Save Split Windows Configuration]

Multi-Window Emacs Workflow

a much better workflow, is with multiple windows.

xah linux desktop 2014-03-05
3 emacs windows among other app's windows.

when you start emacs, create 2 windows that don't overlap side-by-side.

In this workflow, you control windows, not split-panes.

it's better because:

  1. The operating system provides much more powerful command and keys to control window geometry. (for example, in Mac, you have “mission control”, in linux, you have various window managers.)
  2. Emacs will not change your window size or close it. No split-pane config problem.
  3. Now you can split/unsplit panes in emacs for many purposes, such as viewing different parts of the same file.
  4. Now you can exploit creating new windows (aka new emacs frame) just for working on a sub-task, then close it when done.

for this workflow to work efficiently, you must also:

  1. define a system-wide easy key to switch to emacs, such as 【F9】.
  2. define a easy key such as【F8】 to switch among emacs's windows. That is, bind a key to the command other-frame. [see Emacs: How to Define Keys]

[see How to Set Key to Switch to Emacs]

IMPORTANT: these 2 keys must be easy keys, because you'll need to call them frequently.

once you have these keys, you can easily switch to any app or any specific window.

your windows always stay the way you want, and nothing's going to close them or change their size.

but also, now you can constantly split/unsplit a window at will, close any split emacs pops up. Using split to view different areas of a file, or use split to keep cursor position. I split/unsplit about every few minutes. Note: you should also have easy keys to split and unsplit windows. On a standard PC keyboard, {【Alt+4】, 【Alt+3】} works well.

See also: Programer Workflow Efficiency

Manage Windows Topic

  1. Emacs: Split Windows Basics
  2. Emacs: Save Split Windows Configuration
  3. Emacs: Effective Windows Management
  4. Emacs: Make Buffer Flow Side-by-Side
  5. Emacs: Restore Opened Files, Windows Config
  6. Emacs: Set Default Window (frame) Size
  7. Emacs: Save Cursor Position
Like my tutorial? Put $5 at patreon

Or Buy Xah Emacs Tutorial

Or buy a nice keyboard: Best Keyboard for Emacs

Ask me question on patreon