From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 12648@debbugs.gnu.org
Subject: bug#12648: 24.2.50; display-buffer switches to another frame
Date: Sun, 14 Oct 2012 20:33:52 +0200 [thread overview]
Message-ID: <507B0590.3020402@gmx.at> (raw)
In-Reply-To: <83391h5787.fsf@gnu.org>
> emacs -Q
> C-x b foo
> C-x 5 b bar
>
> Now you have 2 frames, one displays the buffer "foo", the other
> displays the buffer "bar" and is the selected frame.
>
> M-: (display-buffer "foo" nil 'visible) RET
>
> This quite unexpectedly selects the frame which displays "foo". But
> display-buffer is not supposed to select the window where it displays
> the buffer.
Unless it appears on another frame. If with emacs -Q you do
(let ((pop-up-frames t))
(display-buffer (get-buffer-create "baz")))
that buffer is shown on a new frame and its window is selected.
> And indeed, if the same experiment is repeated when the
> same frame displays "foo" and "bar" in 2 different windows, the window
> that shows "bar" being the selected one, display-buffer does not
> select the other window, as expected.
>
> This is an annoyance when you use GUD with the GDB interaction buffer
> on one frame and the source on another. Each command that moves
> through the program, such as 'n', 's', etc., switches to the source
> frame, which is inconvenient. See
>
> http://lists.gnu.org/archive/html/help-gnu-emacs/2012-10/msg00188.html
>
> for the original complaint.
Maybe we should provide an alist entry like select-frame for this. If
the buffer already appears in another frame, we would select the frame
only if the entry is set. If a new frame is created, we could try to
not select it if the entry is not set and the window manager supports
creating a frame and not selecting it.
martin
next prev parent reply other threads:[~2012-10-14 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 16:49 bug#12648: 24.2.50; display-buffer switches to another frame Eli Zaretskii
2012-10-14 18:33 ` martin rudalics [this message]
2012-10-14 19:28 ` Eli Zaretskii
2012-10-15 12:52 ` martin rudalics
2012-10-15 17:26 ` Eli Zaretskii
2012-10-16 9:39 ` martin rudalics
2012-10-16 13:27 ` Stefan Monnier
2012-10-17 9:37 ` martin rudalics
2012-10-18 19:46 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507B0590.3020402@gmx.at \
--to=rudalics@gmx.at \
--cc=12648@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.