Emacs have a minibuffer, and called the same because of its small screen space, the minibuffer resides in the same area as echo area so many time when any error or informative message appear in the echo area, it just hides the minibuffer for a few seconds or till the time any new keypress is made.
Minibuffer can be activated using typing text to it, and exited by typing **
When finding a file in emacs, for opening or creating one, the minibuffer usually open the default dir, the default directory is stored in buffer-local variable as ‘default-directory’, now whenever emacs will read a filename using a minibuffer it will insert the directory name of the file being opened.
Emacs interpret ‘~/’ as your home directory. you can specify something like this in case you do not want to type the complete path from where you want your files to be opened / created.
The minibuffer in emacs is also a buffer and the usual emacs commands are available for editing. **
When the minibuffer is active, the echo area is treated like an ordinary Emacs window.
Minibuffer uses a feature called as completion these(
The variable completion styles specify the completion style to use.
From the Emacs Manual:
|basic||A matching completion alternative must have the same beginning as|
|the text in the minibuffer before point. Furthermore, if there is|
|any text in the minibuffer after point, the rest of the completion|
|alternative must contain that text as a substring.|
|partial-completions||This aggressive completion style divides the minibuffer text into|
|words separated by hyphens or spaces, and completes each word|
|separately. a \* in the minibuffer is treated as a wildcard and matches|
|any character at the corresponding position.|
|emacs22||this is similar to basic, except it ignores the text in minibuffer after the|
Below additional completions are also defined, and can be used in completion-styles
|substring||A completion alternative must contain the text in the minibuffer before point., and|
|text after point, as substrings.|
|initials||the very agressive completions style attempts to complete acronyms and initalisms|
|emacs21||a very simple completion style, if the text in minibuffer is foobar, only matches|
|starting with foobar is considered.|
M-x uses the minibuffer to read the name of a command, so completion works by matching the minibuffer text with available emacs commands.
THe commands for completion works as defined in the minibuffer when the completion is allowed.
? Display list of completions. (minibuffer-complete-help)
Mouse-1 Clicking mouse button 1 or 2 on a completion alternative chooses it Mouse-2 (mouse-choose-completion).
M-v Selects the window showing the completion list. (switch-to-completion)
There are many modes in emacs which let you do so many things with the minibuffer, some noted ones are ido-mode and helm-mode.
Ido mode is part of the emacs from version 22.
I will cover these modes in my later learnings, and keep updating.