[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9605: 24.0.90; initial point in *scratch* buffer
From: |
martin rudalics |
Subject: |
bug#9605: 24.0.90; initial point in *scratch* buffer |
Date: |
Wed, 28 Sep 2011 20:25:35 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> 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