Zachary Kanfer
I write about programming, music, and comedy.
3y ago
Learn Emacs by asking it questions
Zachary Kanfer

To become an Emacs expert, learn where to find information about Emacs.

Over the fifteen years I've been using Emacs, I've learned a whole lot about it. My packages have over 50,000 downloads, and I've presented at EmacsConf 2020. I co-organize EmacsNYC. In that time, I've found the best place to ask questions about Emacs...is Emacs!

Here's how you can ask Emacs questions.

1. The Emacs tutorial -- C-h t

Emacs's built-in tutorial is incredibly well-written. It takes you from knowing nothing all the way through undo and redo, autosaving, and window management.

2. Show functions and variables -- C-h f, v

Press C-h f and type the name of a function to view the documentation for that function. C-h v views a variable's documentation. If Emacs's source is installed, you can click on a hyperlink to go the function's source.

Emacs's documentation is comprehensive. It explains what a function does, and what its arguments are, but the documentation viewer even also tells you what keypresses that function is bound to! This works not only for built-in key bindings, but any you have added.

3. Show what function is bound to a particular keypress -- C-h k

To ask Emacs what will happen when a certain key or series of keys is pressed, type C-h k, then the key you are interested in. This brings up the same documentation from C-h f, with the same detailed information.

4. Show what keys are bound in the current buffer -- C-h b

If you don't know what you can do in the current buffer, ask Emacs! C-h b lists all the functions currently bound.

If you have a multi-key binding, you might not know what comes next. After beginning any prefix, press C-h to show bound keys after that prefix. Even an Emacs pro will learn something new with C-x C-h.

5. View documentation about active major and minor modes -- C-h m

To see documentation for the modes that are currently active, ask Emacs! C-h m displays the mode descriptions plus bound keys.

If you have Emacs questions, start by asking Emacs. It knows best.

0

Atomic Essay

Comments

What will you write today?

Write, publish, get feedback, and become a better writer.

Trusted by 75,000+ writers