Learning Emacs – part 1: Introduction, entering emacs, and exiting emacs

So I’ve decided to learn Emacs. I’ve always been more of a Vi man previously, and I still consider some moderate amount of comfort with Vi to be a necessity for any Unix sysadmin. I’ve also used a few of the major IDE’s for programming: I use Eclipse with RadRails for all of my Ruby development, a friend who’s trying to get me to learn Java has introduced me to NetBeans, and I’ve played a bit with C# in Visual Studio.

So why learn Emacs? Well, there are a so many people on the net who swear by Emacs, including some who otherwise seem to be very sensible and non-masochistic. 🙂 It’s also supposed to be the environment of choice for Lisp and Scheme programming, which is something I’d like to learn more about. So, operating under the principle that “where there’s smoke there may be fire”, I’m going to give Emacs a chance and see if I can learn enough of it to at least stand it. 🙂

I’m starting with installing Gnu Emacs under Cygwin. I won’t go into details on how to install Cygwin, as I think that’s covered quite completely elsewhere (specifically in the Cygwin documentation), although I may do a later post on how I’ve customized my Cygwin environment to make it more comfortable and more usable. What am going to do, is document my experiences learning Emacs, and what I’ve learned.

Under Cygwin, emacs is installed in the usr\bin directory under the cygwin directory (on my system “c:\cygwin\usr\bin”).

To start emacs from a shell prompt, just type “emacs” or you can type “emacs filename.txt” to open a file (in this case, called filename.txt). In a later installment of this series, we’ll look at how to open files from within an already started emacs.

To exit emacs use “C-x C-c”, which mean to hold down the “Control” key while hitting the “x” key, then hold down the “Control” key while hitting the “c” key.

Under Cygwin, there’s also a startmenu shortcut conveniently created by the Cygwin setup program. Or if you’re really smart, you can use Launchy (like I do). 🙂

If you’ve got X installed (which you should), you’ll get a graphical emacs like this:

Emacs in X

If you’re not running X, you’ll get a slightly less friendly looking version of Emacs, like this:


There’s also a native Win32 Emacs version.

From what I remember of being a Mac version, you could get Gnu Emacs from Fink, or there are some native Aqua ports of Emacs.

If you’re a Linux user then it should of course be easy to get a copy of Gnu Emacs from your preferred Linux distribution. 🙂

Next time, we’ll talk about actually using the damn thing. 🙂

Other installment in this series: part one, part two, part three, and part four.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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