The Emacs manual and the community in general uses a convention to refer to different key combinations used within Emacs. Specifically, Emacs has the notion of a "modifier key" that is pressed along with another key to modify its action.
An example of this notation is "C-c". In this key combination "C" is the modifier and stands for the "Ctrl" key and "c" is the key whose action is being modified (the literal character "c").
The modifier shorthand:
"C-" --> The "CTRL" key
"M-" --> The "Meta" key (usually, the "Alt" key)
"s-" --> The "Super" key (the "Cmd" key on Macs and the "Windows" key on PCs)
There are other, less commonly used modifiers that I will not get into here.
The key combination "C-x C-s" means you press "Ctrl+x" followed by "Ctrl+s"
In addition to the above modifiers, the special keys "Esc", "Return (Enter)" and "Shift" are denoted by "ESC", "RET" and "S", respectively.
```
# Basic Emacs Concepts
Here, I discuss some basic Emacs concepts and terminology that may be
confusing to newcomers (especially to people used to Vim terminology)
- A bunch of text that Emacs is editing is known as a **buffer**
- A buffer does not necessarily correspond to an actual file on disk.
It may be just a bunch of text in memory.
- When a buffer corresponds to a file on disk, we say that the buffer
is **visiting** that file.
- Emacs typically has many buffers open at once.
- The display of Emacs may be split into different **windows** (not to
be confused with your operating system's windows: the operating
system window for Emacs can have multiple Emacs windows inside it).
- An operating system window for Emacs is called an Emacs **frame**.
Thus, when the Emacs manual talks about opening a new frame, this
essentially means opening a new OS *window* containing an(other)
instance of Emacs.
- The concepts conventionally known as cutting and pasting are
referred to as **killing** and **yanking**, respectively in Emacs
parlance.
- The current position of the cursor is called the **point** in Emacs.
Technically, **point** is defined as the position right before the
character where the cursor currently is.
- Finally, each buffer may have several **modes** associated with it:
a **major mode** and possibly several **minor modes**.
- The **major mode** defines the main behavior of Emacs in the
currently selected buffer. This can be roughly thought of as the
file type. For example, if you're editing a Python file, the major
mode is (by default) `python-mode` which causes Emacs to highlight
Python syntax and automatically indent and outdent your code blocks
as syntactically required by your Python code.
- **Minor modes** define subtle changes in behavior and several minor
modes may be active at once in the same buffer. An example minor
mode is `flyspell-mode` which automatically highlights spelling
* Quitting Emacs [ Now you can't say you don't know how to quit Emacs :-) ]
C-x C-c --> Quit Emacs and get prompted to save any unsaved files (buffers not visiting a file will simply be discarded unless you're running in client-server mode)
* Saving a buffer
C-x C-s --> Save the current buffer. If not visiting a file, it will prompt you for a file name to use to save the buffer.
* Searching within a buffer
C-s --> Search forwards within the buffer. Search is incremental and case-insensitive by default.
Press C-s to move to the next match.
If you press "RET", point is moved to the currently highlighted word and the search ends.
C-r --> Same as C-s except it searches backward
C-_ or C-/ --> Undo the last action. Keep pressing it to move up the undo tree.
C-? or M-_ --> Redo the previous change
The "undo" and "redo" commands can take prefix numerical arguments to undo or redo that many actions: