Emacs (barring Vi of course) is the finest text editor around. Many consider it to be the holy grail of software, which allow you to do everything from writing text, to checking mails, coding, and even playing games.

For a person new to using Emacs however, it does pose a learning curve. To use Emacs, you need to learn new habits and unlearn a few others. Having a nice, easy to understand tutorial definitely helps. David Röthlisberger has put together a nice Emacs tutorial that takes you through the basics and shows you how to use Emacs to write code. The goal of the tutorial is to teach you how to use Emacs effectively to write programs in any language. In writing his tutorial, he tries to leverage the chief strengths of Emacs for programmers namely -

Interpreter for Emacs Lisp - which allows you to write your tools and customizations interactively