Getting started

June 13, 2007 at 12:02 pm Leave a comment

This tutorial is a bit out dated now.  I have created a new version of it over on my new blog which is an updated version of this one.

In the last post in this series, I talked about why I decided to learn Emacs. In this post, I am going to explain how to get Emacs up and running and go over some essential stuff.


If you are using a Mac, I recommend getting Aquamacs Emacs. Its basically Emacs, but with a nice Mac look and feel. Installing is simple, just download the universal binary, open and drag the Aquamac Emacs icon into the applications folder.

On windows its almost as simple. Download the zip file (I grabbed emacs-22.1 from here), and extract it into any folder on your machine, I choose C:\, which placed Emacs in C:\emacs-22.1


Emacs is highly customisable, and all the settings relevant to your setup are stored in a file called .emacs or _emacs. Emacs searches for this file in your home directory, which is fine on OS X and Linux, but what about windows where you don’t really have a home directory?

The trick is to create an environment variable called HOME that contains the location of a directory you wish to use. A sensible place to store your _emacs is in the Application Data folder, normally located at C:\documents and settings\*username*\Application Data

To create the environment variable:

  1. Right Click on My Computer and select properties
  2. Click on the Advanced tab
  3. Click the environment variable button at the bottom
  4. Click the new button under the User variables for username pane
  5. Enter HOME as the variable name, and the location of the directory that will contain your _emacs file as the value


Now its time to fire up emacs. On the Mac, run the Aquamac Emacs application you have just installed, on Windows double click on C:\emacs-22.1\bin\emacs.exe

The first thing you will notice is that Emacs behaves just like most other text editors – you can type stuff, open, close and save files using the menus etc. However, to start on the road to becoming a power user, you have to start learning the keyboard commands of which there are many!

The best way to learn is to work your way through the built-in tutorial. While reading it, you will quickly learn that most Emacs commands are accessed by holding the CRTL or ALT key and issuing some number of key presses. To open the tutorial, press and hold CTRL and type ‘h’. Release all the keys and type ‘t’ – the tutorial will then open, and it can teach you much more than I can!

In my next post, I will describe how I customised Emacs to help with Ruby and Rails development.


Entry filed under: emacs.

Choosing an Editor The Emacs Code Browser

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


%d bloggers like this: