Emacs: Messages Buffer
Messages buffer is a special buffer in emacs. It displays command outputs and results of lisp evaluation. [see Evaluate Elisp Code]
Switch to the Messages Buffer
Messages buffer has a buffer name of
*Messages*. You can switch to it by any buffer switch commands. [see Switch Buffer]
here's a dedicated command to switch to the messages buffer:
switch to the
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*")
(info "(elisp) Displaying Messages")