I use Erc to connect to IRC from Emacs. When looking at output that occasionally updates with a new line, the default behaviour of Emacs to scroll up half a page can be annoying. This can be changed by setting the variable
scroll-conservatively
to the value 101 or greater. However, I wanted to keep the default behaviour for other buffers, so I added the following to my
.emacs.d/init.el
:
(defun em-erc-channel-join ()
(set (make-local-variable 'scroll-conservatively) 101))
(add-hook 'erc-join-hook 'em-erc-channel-join)
This will make sure that the value of this variable is only set for channel buffers.