Modes are always buffer-specific, and they come in two flavors: major modes and minor modes. Modes are Emacs’ way of switching between key bindings, functionality, syntax highlighting and pretty much any other mutable item in Emacs. Don’t confuse it with the mouse cursor though. The point is the caret, or cursor, in other editors and in most operating systems. You can have multiple windows in a frame, but only one buffer in a window.Ī buffer is said to be active when the point is in it that is, if you were to type, your text would be input into that buffer. And windows, in turn, are contained in a frame. In Emacs a window is what people in other environments would call a frame – and vice versa.Ī window is something a buffer is contained in. This is where Emacs terminology differs from the established standard. And you can read about Why Emacs has Buffers for more information. The Buffer is a very important concept to understand. If you need to do some quick string manipulation it’s very common to simply create a throwaway buffer (usually named “12312eqwdowqjd” or something to that effect), do your thing and then kill it. In Emacs it is common to create and dispose of buffers as needed. It can also be a transient thing (like the help file or the output from your compiler).
It’s where your source code is displayed and it’s where most of your time is spent.Ī buffer need not point to a file it can exist in the aether and never see the light of day on your filesystem. In Emacs, a buffer is the area in which you write things. That age is reflected in the sometimes arcane and baroque ways it handles things. Important ConceptsĮmacs is very, very complicated – but it is also very, very old.
Once you’re done with this tutorial then I highly recommend you read my book Mastering Emacs – it’s 314 pages long and it will take you from knowing nothing (or almost nothing) about Emacs to fluently mastering not only how to navigate and edit, but also how to make use of Emacs’s extensive, self-documenting help system. This guide will help you move past the tutorial and should hopefully explain away some of the more typical questions that people have about Emacs. With that in mind, I have found there’s a gap between what the Tutorial sets out to do (basic movement and editing) and what people need to actually get started. That’s a shame, because although Emacs is complicated it does come with an excellent and exhaustive manual. No wonder so many people find it difficult to get their footing and opt for simpler editors.
Emacs is a complex beast with thousands of commands and even more settings that can be customized.