In emacs, can I set up the *Messages* buffer so that it tails?

前端 未结 6 721
借酒劲吻你
借酒劲吻你 2021-01-07 22:42

Basically I want the *Messages* buffer to always scroll to the bottom when a new message arrives.

Can I do that?

6条回答
  •  萌比男神i
    2021-01-07 22:56

    For multiple frames you probably want:

    (defadvice message (after message-tail activate)
      "goto point max after a message"
      (with-current-buffer "*Messages*"
        (goto-char (point-max))
        (walk-windows (lambda (window)
                        (if (string-equal (buffer-name (window-buffer window)) "*Messages*")
                            (set-window-point window (point-max))))
                      nil
                      t)))
    

提交回复
热议问题