Subject: bug#9605: 24.0.90; initial point in *scratch* buffer

From: martin rudalics <[email-masked]>
Date: Wed, 28 Sep 2011 20:25:35 +0200

> emacs -Q
 >
 > M-<   ; point at start of *scratch*
 > C-x b foo
 >
 > In foo, insert and evaluate:
 >
 > (with-current-buffer "*scratch*"
 >   (goto-char (point-max))
 >   (insert "foo"))
 >
 > Then
 >
 > M-x quit-window
 >
 > In Emacs 23.3, point in *scratch* is now at point-max (after "foo").
 > In Emacs 24.0.90, it is at point-min.

It's not easy to find a general solution for this.  Suppose you edit the
same buffer in two windows A and B, temporarily switch to another buffer
in window B, continue editing in window A, and eventually quit window B.
In this case you want point in window B be at the position it had before
you switched to another buffer in it.

In the case at hand we could call `kill-buffer' in `exit-splash-screen'.
But can't we do the insertion before or while the buffer is displayed?

martin