Appendix B. Making Emacs Work the Way You Think It Should

The most frustrating part of learning Emacs is sitting down at a terminal and finding out that some “helpful” administrator has changed all the commands. At this point, you’re helpless: you can’t delete the global customization file, the Emacs you have doesn’t match the manual (or this book), and the administrator probably didn’t even think of documenting the changes.

Similar problems arise if the administrator who set up your account also gave you a “useful” private .emacs file. This private file may indeed be great for experienced users, but if it prevents you from learning the editor, it isn’t really much help.

Fortunately, there is a way out. If you find yourself in this situation, delete or rename any .emacs file you already have. Then create a one-line .emacs file in your home directory. It should look exactly like this:

(setq inhibit-default-init t) ; no global initialization

Then start Emacs again. This file prevents Emacs from reading its global initialization file.

There’s still one awkward situation: what if you’re sitting down at someone else’s keyboard? You start Emacs, and all of a sudden you’re faced with someone else’s “private” key bindings and features. Even in this situation, there’s a solution:

  • Try using the command emacs -q. The -q option tells Emacs not to read the user’s .emacs file before starting. By doing this, you’ll avoid the user’s private customizations.

  • After this step, however, you still don’t ...

Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.