unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9605: 24.0.90; initial point in *scratch* buffer
@ 2011-09-26 14:28 Katsumi Yamaoka
  2011-09-28 17:19 ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2011-09-26 14:28 UTC (permalink / raw)
  To: 9605

When I start Emacs with the argument `-q' and type `q' the cursor
is put at the beginning of the *scratch* buffer.  But shouldn't it
be the end of the buffer?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#9605: 24.0.90; initial point in *scratch* buffer
  2011-09-26 14:28 bug#9605: 24.0.90; initial point in *scratch* buffer Katsumi Yamaoka
@ 2011-09-28 17:19 ` Glenn Morris
  2011-09-28 17:26   ` Glenn Morris
  2011-09-29  8:23   ` martin rudalics
  0 siblings, 2 replies; 5+ messages in thread
From: Glenn Morris @ 2011-09-28 17:19 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 9605

Katsumi Yamaoka wrote:

> When I start Emacs with the argument `-q' and type `q' the cursor
> is put at the beginning of the *scratch* buffer.  But shouldn't it
> be the end of the buffer?

Yes it should. It goes to point-min because the *GNU Emacs* window has a
quit-restore parameter that looks like:

(other (#<buffer *scratch*> 1 1 33 ...

I don't know what is supposed to update this.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#9605: 24.0.90; initial point in *scratch* buffer
  2011-09-28 17:19 ` Glenn Morris
@ 2011-09-28 17:26   ` Glenn Morris
  2011-09-28 18:25     ` martin rudalics
  2011-09-29  8:23   ` martin rudalics
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2011-09-28 17:26 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 9605


I wonder if this summarizes the issue:

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#9605: 24.0.90; initial point in *scratch* buffer
  2011-09-28 17:26   ` Glenn Morris
@ 2011-09-28 18:25     ` martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2011-09-28 18:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Katsumi Yamaoka, 9605

 > 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#9605: 24.0.90; initial point in *scratch* buffer
  2011-09-28 17:19 ` Glenn Morris
  2011-09-28 17:26   ` Glenn Morris
@ 2011-09-29  8:23   ` martin rudalics
  1 sibling, 0 replies; 5+ messages in thread
From: martin rudalics @ 2011-09-29  8:23 UTC (permalink / raw)
  To: 9605-done; +Cc: Katsumi Yamaoka

>> When I start Emacs with the argument `-q' and type `q' the cursor
>> is put at the beginning of the *scratch* buffer.  But shouldn't it
>> be the end of the buffer?
> 
> Yes it should. It goes to point-min because the *GNU Emacs* window has a
> quit-restore parameter that looks like:
> 
> (other (#<buffer *scratch*> 1 1 33 ...
> 
> I don't know what is supposed to update this.

Should be fixed now.  Please try again.

martin






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-29  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 14:28 bug#9605: 24.0.90; initial point in *scratch* buffer Katsumi Yamaoka
2011-09-28 17:19 ` Glenn Morris
2011-09-28 17:26   ` Glenn Morris
2011-09-28 18:25     ` martin rudalics
2011-09-29  8:23   ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).