kingtim/nrepl.el — pull request #219 by briprowe (2013-01-15 02:51:06+00:00)
Title: Emit server log output at bottom of *nrepl-server* buffer.

Currently if the *nrepl-server* buffer gains focus while the nrepl.el is writing to the buffer, the output will be inserted at the point's location. This is problematic if the point was moved away from (point-max).

This can happen if you:
1. clear the *nrepl-server* buffer (ie. by M-S->, M-S-<, C-w)
2. execute code that causes nrepl.el to output to *nrepl-server*
3. C-x b *nrepl-server*

In order to prevent this behavior, this patch wraps a (save-excursion (goto-char (point-max) ...) around the code that outputs to *nrepl-server*.