Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 38 ยท Getting Started

A Tour of the Emacs Window

Learn the parts of the Emacs screen: frame, window, buffer, mode line, echo area and minibuffer, the scratch buffer and the menu bar, and how to read the mode line.

The first time Emacs opens, you see a startup screen with links and a few lines of text. Before you press any keys it is worth learning the names of the parts of the screen, because the whole documentation uses them. Emacs uses some words differently from other programs, and the differences are the most common source of confusion.

Frames and windows

Emacs calls what you normally call a window a frame: the operating-system window or the full terminal. Inside one frame, Emacs can divide the screen into several windows, which are panes, each showing a buffer. So a "split screen" is one frame with two windows. You will create these with C-x 2 and C-x 3 later in the windows lesson.

flowchart TB
  F["Frame (the OS window)"] --> M["Menu bar and tool bar"]
  F --> W["Windows (panes showing buffers)"]
  W --> ML["Mode line: status per window"]
  F --> E["Echo area / minibuffer"]

A frame contains windows, and each window has its own mode line.

The parts of the screen

From top to bottom in a default graphical Emacs:

  • Menu bar (File, Edit, Options, Buffers, Tools, Help). Every command appears here with its key binding, which makes the menus a gentle teacher. In a terminal, press F10 to open it as a text menu, or run M-x tmm-menubar.
  • Tool bar with icons. Many users turn it off.
  • Windows showing buffer text. The cursor is called point.
  • Mode line: the status bar at the bottom of each window.
  • Echo area: the bottom line of the frame. Messages appear here.
  • Minibuffer: the same line, when Emacs asks you for input (a file name, a command name). The echo area and the minibuffer share one line.
  • Fringes and scroll bars on the sides in graphical mode (fringes show line wrap and truncation markers).

Reading the mode line

The mode line packs a lot of information into a few characters. Its exact layout varies by version and settings, but it normally contains:

  1. Status flags: whether the buffer is modified (**), unmodified (--) or read-only (%%), and whether the file was changed on disk.
  2. The buffer name.
  3. The position: All, Top, Bot or a percentage, plus the line number (L12) and perhaps the column.
  4. The major mode and active minor modes in parentheses, such as (Lisp Interaction) or (Text Fill).

You will also see the line and column numbers if line-number-mode and column-number-mode are on. Turn the column on with M-x column-number-mode.

JS Stand-in: build a mode-line summary

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The scratch buffer

New sessions open a buffer called *scratch*. It uses Lisp Interaction mode and is meant for trying out snippets, not for saving. In it:

  • C-x C-e evaluates the expression before point and shows the result in the echo area.
  • C-j evaluates it and inserts the result into the buffer.
  • Text typed here is not saved to a file unless you do it yourself (C-x C-w).

Try (+ 40 2), then C-x C-e. The echo area shows 42. Type (message "Hello from Emacs") and evaluate it; the text appears in the echo area and is stored in a buffer called *Messages*, a log of everything Emacs has said to you. Open the log any time with C-h e.

JS Stand-in: an echo-area message log

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Using the menus and the mouse

A mouse works in Emacs: click to place point, drag to select, use the wheel to scroll. The File, Edit and Options menus contain the commands for saving, copying and changing preferences, each listed with its key binding. If you do not know the shortcut for something, find it in a menu once and then memorize the key. The Help menu leads to the tutorial and the manuals.

Customizing the look (a preview)

You can hide the extra bars later in your init file with lines such as (menu-bar-mode -1) and (tool-bar-mode -1). For now leave them on while you learn. The configuration chapter covers this.

Run the built-in tutorial

Emacs ships with an interactive tutorial. Press C-h t (hold Ctrl, press h, release both, then press t). It takes about 30 minutes and teaches the basic keys by letting you practice in a real buffer. Come back to this course after it; the following lessons explain the why behind those keys.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In Emacs terminology, what is a frame?

    A frame is what other programs call a window. A window is a pane inside a frame.
  2. 2. What is point?

    Point is where the cursor is; many commands act at point.
  3. 3. Which key evaluates the Lisp expression before the cursor in scratch?

    C-x C-e runs eval-last-sexp and shows the value in the echo area.
  4. 4. Where can you read earlier echo-area messages?

    Emacs logs messages in the Messages buffer.

Summary

  • A frame (OS window) holds one or more windows; each window shows a buffer and has a mode line.
  • The echo area and minibuffer share the bottom line: output and prompts.
  • The mode line shows modification status, buffer name, position and modes.
  • *scratch* is for Lisp experiments (C-x C-e, C-j); *Messages* logs what Emacs said.
  • C-h t starts the built-in tutorial.

Next: Key Notation and the Help System