Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Emacs editing environment, Part 1: Learn the basics of Emacs

Get going with this famous open source editor

Michael Stutz, Author, Consultant
Photo of Michael Stutz
Michael Stutz is author of The Linux Cookbook, which he also designed and typeset using only open source software. His research interests include digital publishing and the future of the book. He has used various UNIX operating systems for 20 years.

Summary:  Master the Emacs editor and delve into the depths of its most advanced editing commands that have made it famous. The open source Emacs editor (one of the powerhouses of UNIX® computing) is a large, complex application that does everything from editing text to functioning as a complete development environment. It's rich in features and is unlike any other program you're likely to have encountered, especially in the way you specify and input commands. This tutorial, the first in a series, gets you going by providing a concise, hands-on introduction to the most important Emacs editing concepts and features.

View more content in this series

Date:  20 Mar 2007
Level:  Introductory

Activity:  29203 views
Comments:  

Before you start

Learn what to expect from this tutorial, and how to get the most out of it.

About this series

The Emacs editing environment is a favorite of UNIX® developers. It's known around the world as the king of editors, but many users find it has a bit of a learning curve. The Emacs environment doesn't seem intuitive at first glance, and it doesn't work like other editors and word processors. But learning Emacs doesn't have to be difficult. Once you get going, you'll see how intuitive it is and become more comfortable with it after each use. This tutorial series shows you the way, taking you from the basics of Emacs, such as its features, philosophy, key-command layout, and methods for editing text, through many of its powerful editing features.

After completing this series, you'll be able to comfortably use Emacs for everyday editing, be well on your way to Emacs proficiency, and have a good feel for many of the advanced capabilities of Emacs.

About this tutorial

The first part of this tutorial focuses on the history and origin of Emacs and the later part explains how to:

  • Start and stop Emacs
  • Manipulate files and read them in for editing
  • Use basic editing keys
  • Move through documents
  • Use the powerful Emacs text-marking routines
  • Use the mouse for editing and selection

Objectives

The primary objective of this tutorial is to introduce you to the Emacs editor, give you a concise introduction to the application and its design philosophy, and show you how to be productive in this editing environment.

Upon completion of this tutorial, you'll have learned everything you need to know to perform basic text editing with Emacs.

Prerequisites

Previous knowledge of Emacs is not required to benefit from this tutorial; however, you should have a basic understanding of what text editors and word processors do. Although this tutorial is written for all levels of UNIX expertise, it's helpful if you have an understanding of the UNIX filesystem, including:

  • Files
  • Directories
  • Permissions
  • Filesystem hierarchy

System requirements

This tutorial requires a user account on any UNIX-based system that has a recent copy of Emacs installed.

There are several varieties of Emacs; the original and most popular is GNU Emacs, which is published online by the GNU Project (see Resources).

You should have a recent copy of GNU Emacs -- one that is at version 20 or greater. Versions 20 and 21 are the most commonly available, and development snapshots of version 22 are also available. This tutorial works with any of these versions for Emacs. If your system is running something older, it's time to upgrade.

To know what version of Emacs you have running, use the GNU-style --version flag, as follows:

$ emacs --version
GNU Emacs 22.0.91.1
Copyright (C) 2006 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ 

1 of 8 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=202928
TutorialTitle=Emacs editing environment, Part 1: Learn the basics of Emacs
publish-date=03202007
author1-email=stutz@dsl.org
author1-email-cc=mmccrary@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.