From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#12648: 24.2.50; display-buffer switches to another frame Date: Sun, 14 Oct 2012 20:33:52 +0200 Message-ID: <507B0590.3020402@gmx.at> References: <83391h5787.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1350239705 20593 80.91.229.3 (14 Oct 2012 18:35:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 18:35:05 +0000 (UTC) Cc: 12648@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 20:35:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TNT1q-0004jt-Bg for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2012 20:35:10 +0200 Original-Received: from localhost ([::1]:46750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNT1j-0003MC-DJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2012 14:35:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNT1g-0003Ij-FP for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 14:35:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNT1f-0002am-AI for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 14:35:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNT1f-0002ae-6j for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 14:34:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TNT2f-0004MV-KY for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 14:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Oct 2012 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12648-submit@debbugs.gnu.org id=B12648.135023971316708 (code B ref 12648); Sun, 14 Oct 2012 18:36:01 +0000 Original-Received: (at 12648) by debbugs.gnu.org; 14 Oct 2012 18:35:13 +0000 Original-Received: from localhost ([127.0.0.1]:44086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNT1s-0004LR-SG for submit@debbugs.gnu.org; Sun, 14 Oct 2012 14:35:13 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:50517) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TNT1q-0004L2-70 for 12648@debbugs.gnu.org; Sun, 14 Oct 2012 14:35:11 -0400 Original-Received: (qmail invoked by alias); 14 Oct 2012 18:34:01 -0000 Original-Received: from 62-47-48-254.adsl.highway.telekom.at (EHLO [62.47.48.254]) [62.47.48.254] by mail.gmx.net (mp039) with SMTP; 14 Oct 2012 20:34:01 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/QBcJWDHnQIY78lgPkv7txga+AhOHN4+Qa+cjei6 HW6Z6C0UHf24f5 In-Reply-To: <83391h5787.fsf@gnu.org> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65604 Archived-At: > 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