[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: The window-pub branch

From: Drew Adams
Subject: RE: The window-pub branch
Date: Tue, 7 Dec 2010 09:11:04 -0800

> Then what about
>      M-: (display-buffer "*scratch*" nil t)
> which does indeed select the window on the other frame and 
> switch focus.

(I guess you mean also, like before, put *scratch* and some other buffer in
separate frames, and do that from the non-*scratch* frame.)

> While it is documented as
>      (display-buffer BUFFER-OR-NAME &optional NOT-THIS-WINDOW FRAME)
>      Make buffer BUFFER-OR-NAME appear in some window but !!! 
> don't select !!! it.

Seems like a `display-buffer' bug to me - independent of `M-:'.

Put that sexp in *scratch*, change the buffer name to that of the other buffer
(in the other frame), use `C-x C-e', and you get the same behavior: the window
in the non-*scratch* frame gets selected and the non-*scratch* frame gets the
input focus.

I agree that this behavior seems to contradict the doc string for
`display-buffer', which says (for FRAME) "If the buffer is already displayed in
some window on one of these frames simply return that window" in addition to
"but don't select it".

And this behavior is the same at least as far back as Emacs 20.  So I don't have
a good answer for you about the intention wrt `display-buffer'.  It seems to me
that this is a (longstanding) behavior bug.  But maybe someone will argue that
the doc is wrong instead (and has been wrong an equally long time).  Or maybe
someone will show us how the behavior actually corresponds perfectly to the doc.

But again I don't see this as related to M-:.  I especially don't see this as a
good reason to change the behavior of M-:.

> Whereas 'select-window'
>      (select-window WINDOW &optional NORECORD)
>      Select WINDOW.  Most editing will apply to WINDOW's buffer.
> does NOT select the window to apply my editing.

`select-window' _does_ select the window for your editing - see my earlier mail.
It's just that `M-:' returns the window selection to what it was before it was

Concentrate on your windows discussion and `display-buffer', not on `M-:', which
is a particular user command.  `M-:' is not the way to test whether
`select-window' (or anything else) does what is expected of it.  You are using
not only `select-window' but also `M-:'.

> What are the intentions you see and how do they make sense to you?
> Just curious ...
> > IMO this has nothing to do with your surrounding window 
> > discussion; this part is only about the interactive behavior
> > of command `eval-expression'.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]