Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: Basic, Up: Top


9 The Minibuffer

The minibuffer is the facility used by Emacs commands to read arguments more complicated than a single number. Minibuffer arguments can be file names, buffer names, Lisp function names, Emacs command names, Lisp expressions, and many other things, depending on the command reading the argument. You can use the usual Emacs editing commands in the minibuffer to edit the argument text.

When the minibuffer is in use, it appears in the echo area, and the terminal's cursor moves there. The beginning of the minibuffer line displays a prompt in a special color, to say what kind of input you should supply and how it will be used. Often this prompt is derived from the name of the command that the argument is for. The prompt normally ends with a colon.

Sometimes a default argument appears in parentheses before the colon; it too is part of the prompt. The default will be used as the argument value if you enter an empty argument (that is, just type <RET>). For example, commands that read buffer names always show a default, which is the name of the buffer that will be used if you type just <RET>.

The simplest way to enter a minibuffer argument is to type the text you want, terminated by <RET> which exits the minibuffer. You can cancel the command that wants the argument, and get out of the minibuffer, by typing C-g.

Since the minibuffer uses the screen space of the echo area, it can conflict with other ways Emacs customarily uses the echo area. Here is how Emacs handles such conflicts:

  • If a command gets an error while you are in the minibuffer, this does not cancel the minibuffer. However, the echo area is needed for the error message and therefore the minibuffer itself is hidden for a while. It comes back after a few seconds, or as soon as you type anything.
  • If in the minibuffer you use a command whose purpose is to display a message in the echo area, such as C-x =, the message hides the minibuffer for a while. The minibuffer contents come back after a few seconds, or as soon as you type anything.
  • Echoing of keystrokes does not take place while the minibuffer is in use.

 
 
  Published under the terms of the GNU General Public License Design by Interspire