Emacs: Messages Buffer
What is Messages Buffer
Messages buffer is a special buffer. It displays command outputs or warning and errors.
![emacs messages buffer 2022 VKj9k](i/emacs_messages_buffer_2022_VKj9k.png)
Switch to the Messages Buffer
view-echo-area-messages
【Ctrl+h e】-
switch to the
*Messages*
buffer.
Name of Messages Buffer
Messages buffer has a buffer name of *Messages*
. You can switch to it by any buffer switch commands. [see Switch Buffer]
Special Behavior of the Messages Buffer
- The messages buffer automatically truncates the top entries when the buffer reaches some size (see variable messages-buffer-max-lines [see Show Variable Value, List Variables]).
- When a string is repeated many times, it automatically condenses the repeated lines.
- If a string is a huge line, the line is truncated automatically.
Example, the following prints “yay [19 times]” instead of the “yay” line for 19 times.
;; print a line many times (setq xx 1) (while (< xx 20) (message "yay") (setq xx (1+ xx)) ) (switch-to-buffer "*Messages*")