[Top][All Lists]

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

bug#745: pop-to-buffer, frames, and input focus

From: Helmut Eller
Subject: bug#745: pop-to-buffer, frames, and input focus
Date: Wed, 20 Aug 2008 09:35:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)


The behavior of pop-to-buffer in combination with multiple frames is
rather unpredictable or at least not what I expected.

For example:

  shell$ cat pop-to-buffer-test.el
  (let ((frame (selected-frame))
        (pop-up-frames t))
    (display-buffer (get-buffer-create "foo"))
    (select-frame-set-input-focus frame))
  (let ((display-buffer-reuse-frames t))
    (pop-to-buffer "foo"))
  shell$ emacs -Q -l pop-to-buffer-test.el

Pops up two frames, one frame displays the "foo" buffer and the other
the "*scratch*" buffer (so far so good).  But the "foo" frame has not
the input focus.  Isn't pop-to-buffer supposed to switch input focus

Also note that I had to save and restore the selected frame
around display-buffer.  If I try

  emacs -Q --eval '(let ((pop-up-frames t)) 
                     (display-buffer (get-buffer-create "foo")))' 

the "foo" buffer is selected, even though display-buffer should not
switch the selected window.

Not even save-window-excursion stops display-buffer from switching the

  emacs -Q --eval '(save-window-excursion 
                     (let ((pop-up-frames t)) 
                        (display-buffer (get-buffer-create "foo"))))'

This is with:
 GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2008-08-15 on xaital
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--without-sound' '--without-pop' '--without-gif' 

My window manager is Sawfish 1.3.


reply via email to

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