Emacs: Messages Buffer

By Xah Lee. Date: . Last updated: .

What is Messages Buffer

Messages buffer is a special buffer. It displays command outputs or warning and errors.

emacs messages buffer 2022 VKj9k
emacs messages buffer

Switch to the Messages Buffer

view-echo-area-messagesCtrl+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

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*")

Reference

Emacs Principle

Elisp, Doc Lookup

Working with Elisp