O'Reilly logo

Learning GNU Emacs, Second Edition by Eric S. Raymond, Bill Rosenblatt, Debra Cameron

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making Simple Drawings

Emacs is not, by any means, a graphics package, but it does provide some limited drawing capabilities. Emacs includes a picture mode that allows you to draw simple pictures using keyboard characters. It’s useful for inserting a quick drawing or diagram in a mail message, something that most graphics packages can’t do. It’s also good for making block diagrams, timing diagrams (for electrical engineers), timelines, and other simple drawings.

Don’t overlook this simple facility! We have seen many papers that were carefully formatted with troff or TEX, with a simple star-and-bar diagram dropped in the middle. Sure, you can use some picture processor to create a much nicer drawing; but in the real world, using pic or any of its TEX equivalents can be time-consuming and painful. Star-and-bar diagrams aren’t pretty, but they are easy.

Picture mode turns the area being edited into a kind of drawing board consisting of columns and rows. In picture mode, you can create simple pictures (such as the one in Figure 8-2) using keyboard characters without having them “rearranged” by the word-wrap capabilities of auto-fill mode, for example.

Drawing in picture mode

Figure 9-2. Drawing in picture mode

To enter picture mode, type ESC x edit-picture. The word Picture appears on the mode line, followed by the default drawing direction (more on that shortly). Typing C-c C-c exits picture mode and returns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required