
Getting started in emacs can be overwhelming at first, but there’s no need to get discouraged. With emacs helper functions ready to assist, you can sit back and learn at your own pace.
In order to complete this tutorial, you must install emacs on your system.
How To Initiate Emacs Helper Functions
In order to access help in emacs, all you need to do is type C-h
(Ctrl + H on your keyboard).
C-h
is an interactive function that will prompt you for more input. If you want to see a menu of all the options available, press ?
and the help menu will pop up, and you can use your keyboard to select an option from the menu.
If you already know which function you want to run, you can type it right away. No need to wait for the menu to prompt you.
The Most Important Help Functions
While your particular needs and systems may elevate certain helpful functions up or notch them down, there are few invaluable functions for which every emacs user must commit their memory:
Function for Key Sequence
If there’s one thing I wish I was doing when I first started learning emacs, it would be calling documentation on functions as I was keying them in.
Remember, while you’re using emacs and punching in various key commands, there are functions running in the background. Those functions are attached to the keystrokes you’re punching in.
The helper functions can tell you exactly which functions are running with each key press.
Let’s take standard example: the save function. In order to save your work in emacs, you can key in C-x C-s
. But what function runs in the background in order to accomplish this task.
To discover the function, type C-h k
. Then, you’ll be prompted for the key command. Type in C-x C-s
and a window will pop up with the documentation on the function:
That’s a detailed documentation listing for one little function. Every function in Emacs, contributed by hundreds of volunteers over many years, are (for the most part) self-documenting, which means you can access documentation for virtually every function available in emacs, and there are thousands.
As you advance further in your emacs judo, you’ll learn how to chain various functions together to build custom functions to speed up your workflow.
Show The Emacs Manual For This Command
As you proceed on your emacs journey, you will spend a great deal of time running commands upon your text. The most important commands are already bound to certain keys on your keyboard. If there is a command you’re accustomed to running by rote, you may be curious to know the background information about what command.
With the F
key in the help menu you can instruct emacs to deliver the manual page containing extra information about that command.
But first, you’ll need the proper name for that command. For example, you’re aware that C-x C-s
runs the command to save your buffer. But what is the formal name for that function? Use the key function “c Keys” mentioned above to get the function name.
Now, let’s put that all together. You will use C-h
to call the interactive help function followed by F
(that’s a case-sensitive capital “F”) followed by the command for which you are requesting documentation.
The Information
In emacs, documentation is everything. And everything is documented. Emacs ships with a lot of written material that you can refer to at any time while working in emacs.
You can peruse all of this documentation using “Info” mode. Info mode, like other modes in emacs, comes with its own set of key commands for movement and processing.
Here’s some free advice. When starting with emacs, spend a great deal of time in info mode. You won’t regret it. Over many years of learning emacs, you’ll always find something new and fascinating behind the scenes. Info mode describes every aspect of the program itself and includes loads of other documents describing various features and modes.
In order to enter info mode, type C-h i
. When you first arrive, I recommend reading the info manual to learn how to navigate info mode. It should be the first link “Info” in the main menu.