Emacs: Messages Buffer

By Xah Lee. Date: .

Messages buffer is a special buffer in emacs. It displays command outputs and results of lisp evaluation. [see Evaluate Elisp Code]

emacs messages buffer 2022 VKj9k
emacs messages buffer

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:

view-echo-area-messagesCtrl+h e
switch to the *Messages* 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*")

Displaying Messages (ELISP Manual)

Emacs Lisp Doc Lookup

Working with Elisp