We begin by explaining some basic concepts of Emacs. These concepts are explained in more detail in the GNU Emacs Manual.
Conceptually, a buffer is just a string of ASCII characters and two
special characters PNT
(point) and MRK
(mark) such
that the character PNT
occurs exactly once and MRK
occurs at
most once. The text of a buffer is obtained by deleting the
occurrences of PNT
and MRK
. If, in a buffer, there is a
character following PNT
then we say that point is looking at
the character; otherwise we say that point is at the end of buffer.
PNT
and MRK
are used
to indicate positions in a buffer and they are not part of the text of the
buffer. If a buffer contains a MRK
then the text between MRK
and PNT
is called the region of the buffer.
Emacs provides (multiple) windows on the screen, and you can see the
content of a buffer through the window associated with the buffer. The
cursor of the screen is always positioned on the character after PNT
.
A keymap is a table that records the bindings between characters and command functions. There is the global keymap common to all the buffers. Each buffer has its local keymap that determines the mode of the buffer. Local keymap overrides global keymap, so that if a function is bound to some key in the local keymap then that function will be executed when you type the key. If no function is bound to a key in the local map, however, the function bound to the key in the global map becomes in effect.
Survey Survey Loading VIP