From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12648: 24.2.50; display-buffer switches to another frame Date: Sun, 14 Oct 2012 21:28:59 +0200 Message-ID: <83zk3o4zus.fsf@gnu.org> References: <83391h5787.fsf@gnu.org> <507B0590.3020402@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1350243009 13938 80.91.229.3 (14 Oct 2012 19:30:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 19:30:09 +0000 (UTC) Cc: 12648@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 21:30:15 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 1TNTt4-0002Pv-Nu for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2012 21:30:10 +0200 Original-Received: from localhost ([::1]:52918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNTsx-00035a-FJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Oct 2012 15:30:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNTsu-00034K-MX for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 15:30:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNTst-00084u-B3 for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 15:30:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNTst-00084p-7A for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 15:29:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TNTtt-0005f7-JG for bug-gnu-emacs@gnu.org; Sun, 14 Oct 2012 15:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Oct 2012 19:31: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.135024302921725 (code B ref 12648); Sun, 14 Oct 2012 19:31:01 +0000 Original-Received: (at 12648) by debbugs.gnu.org; 14 Oct 2012 19:30:29 +0000 Original-Received: from localhost ([127.0.0.1]:44115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNTtH-0005eH-VV for submit@debbugs.gnu.org; Sun, 14 Oct 2012 15:30:27 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:64211) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNTtE-0005e1-4l for 12648@debbugs.gnu.org; Sun, 14 Oct 2012 15:30:21 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MBW00A00DL8I500@a-mtaout20.012.net.il> for 12648@debbugs.gnu.org; Sun, 14 Oct 2012 21:28:53 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBW00AB2E44F150@a-mtaout20.012.net.il>; Sun, 14 Oct 2012 21:28:52 +0200 (IST) In-reply-to: <507B0590.3020402@gmx.at> X-012-Sender: halo1@inter.net.il 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:65608 Archived-At: > Date: Sun, 14 Oct 2012 20:33:52 +0200 > From: martin rudalics > CC: 12648@debbugs.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. Isn't that difference confusing? > 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. I think this is different: setting pop-up-frames non-nil expresses a wish to see certain behavior that the default shouldn't have. > > 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. Yes, but is the current behavior useful as it is? If gud.el should call display-buffer in some different way to avoid selecting the frame with the source, that, too, could be a good solution.