Learning GNU Emacs

I recently read a copy of O’Reilly’s Learning GNU Emacs. While fairly out-of-date(I read the 2nd edition, making it worse), it was still a valuable book for emacs beginners. Pretty much all of the items in the book are still around; the book may miss newer stuff than came in versions 20, but it covers the basics quite well. I didn’t learn a huge amount of useful things from it, since most of it I either already knew or didn’t care about, but it did tell me about some things I hadn’t known and was a great refresher. I think it would be great if you were just learning how to use emacs and wanted to get more proficient at it.

The book covers a wide range of topics, starting with basic editing tasks. It covers moving around the buffer, buffer and window management, and searching. These tasks are what Emacs novices need to know to start using Emacs, and the book does a very good job of introducing them. Even I learned about a few things, such as the various different kinds of searches and recursive edits. The book then quickly gets into more topics: file and directory management, as well as using a shell inside Emacs. Since I use Emacs almost exclusively for shell use, it’s nice to know other people thought this was rather important as well.

The next few chapters focused on a few things I don’t use Emacs for - email and browsing the Internet. It covers several different email setups, as well as GNUs. I, however, prefer gmail conversation threading to anything else I’ve used, so I’m going to stick with that. The section on browsing the Web and working remotely was out of date, mentioning ange-ftp and W3 instead of the newer Tramp and W3m. While Tramp is very useful, I actually haven’t liked web browsing with emadcs due to how slow it is. Until Emacs gets a faster browser, I’m going to have to stick with Firefox.

The section with more advanced text editing techniques unfortunately doesn’t cover some of the newer additions to Emacs, obviously. For example, the section on rectangle-editing does not cover the not-yet-developed(or at least included) cua-mode, which has the best rectangle implementation so far. There is also a chapter about various markup language modes, such as troff and noff. While these are probably not used much today(I hadn’t even heard of them before), the chapter also covers latex and html editing, which are still widely used. If you need to edit these types of documents, you should probably read the sections on them; otherwise, they aren’t going to contain any information you need.

The next few chapters got into the real meat of Emacs. Keyboard macros were covered extensively, including some tricks I didn’t know about. Since macros are essential to efficient use of Emacs, I’m very happy that they were covered so thoroughly. Customizing emacs is also covered, and some common customization options are discussed. For more advanced customizations, there is also a chapter on elisp that covers developing your own modes. The elisp chapter also covers elisp as a language, and while not complete is a good introduction to developing in elisp.

The next section covered programming modes, such as cc-mode and fortran. While Fortran isn’t used too much anymore, c and c++ definitely are, and the tutorial for cc-mode is pretty good. The chapter not only covers the modes, but how to integrate compiling into emacs, which is often quite useful. There is also a chapter on using Emacs in X, which is usually set up for you in modern emacs distributions

The chapter on version control showed the book’s age a bit, but was still very useful. I don’t use version control from emacs as much as I should, usually just opening up a shell buffer and executing commands from that, so this chapter was quite useful in explaining how to execute these commands using keyboard shortcuts. The three VC systems that emacs was said to support were SCCS, RCS, and CVS - not exactly in widespread use today. However, the commands that the book mentioned still work with the newer VCS’s that emacs comes with nowadays, so this section is still relevant with newer VCS’s like SVN and Git, the two I mainly use.

The book ends with a chapter on emac’s help commands, like describe-variable, describe-key, and apropos. I already knew about these options, but for a new user this section would be great - It gives them all the resources they need in order to get help on any new modes or problems they encounter. I’m not sure it should be at the end, as it is one of Emacs’ most important features, but at least it’s in the book.

All in all, this is a good book that is unfortunately rather dated. I wish it was updated to cover newer versions of emacs; as it is, it’s probably mostly useful only for newer users of emacs who need a introduction to the basic features that are in every release.

Tags: ,

4 Responses to “Learning GNU Emacs”

  1. Alex Ott says:

    I’m currently thinking about to collect all my articles about Emacs, extend them, and make from them a book, with name something like ‘Emacs as development environment’ and publish it through lulu.com…

  2. Jerry says:

    Oh man, I have that exact book and edition on my office floor right this moment. Good times.

  3. vinh nguyen says:

    have u tried conkeror for web browsing? it combines the power of emacs and firefox. i’ve been using it the last 2 months, and since i spend so much time in gmail and the web, it’s become the most used application, beating emacs =].

  4. Martha Lung says:

    Your site is excellent. I m gonna bookmark, thank you.

Leave a Reply