From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#745: pop-to-buffer, frames, and input focus Date: Wed, 20 Aug 2008 09:35:31 +0200 Message-ID: Reply-To: Helmut Eller , 745@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219237415 30099 80.91.229.12 (20 Aug 2008 13:03:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2008 13:03:35 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 20 15:04:17 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVnME-00036c-S9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Aug 2008 15:04:15 +0200 Original-Received: from localhost ([127.0.0.1]:43718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVnLH-00068A-Oi for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Aug 2008 09:03:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KViPr-0004Eu-8e for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:47:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KViPo-0004Ei-RH for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:47:37 -0400 Original-Received: from [199.232.76.173] (port=57741 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KViPo-0004Ef-HR for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:47:36 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:4999) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KViPo-00064U-9F for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:47:36 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KViPn-00042M-2G for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:47:35 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7K7lQ3L017682; Wed, 20 Aug 2008 00:47:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7K7e56S014904; Wed, 20 Aug 2008 00:40:05 -0700 X-Loop: don@donarmstrong.com Resent-From: Helmut Eller Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 20 Aug 2008 07:40:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 745 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121921766413221 (code B ref -1); Wed, 20 Aug 2008 07:40:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 20 Aug 2008 07:34:24 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7K7YJoN013215 for ; Wed, 20 Aug 2008 00:34:21 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KViCx-0006G0-Iv for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:34:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KViCv-0006DG-L9 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:34:18 -0400 Original-Received: from [199.232.76.173] (port=46449 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KViCv-0006D8-Hg for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:34:17 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:3999) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KViCv-0003q7-A7 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:34:17 -0400 Original-Received: from cgp1.rolmail.net ([195.254.252.190] helo=rolmail.net) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KViCt-0003DO-68 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2008 03:34:15 -0400 Original-Received: from dummy.name; Wed, 20 Aug 2008 09:34:10 +0200 Original-Received: from dummy.name; Wed, 20 Aug 2008 09:35:32 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Wed, 20 Aug 2008 03:47:37 -0400 X-Mailman-Approved-At: Wed, 20 Aug 2008 09:02:50 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19557 Archived-At: Hi, 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 too? 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 frame: emacs -Q --eval '(save-window-excursion (let ((pop-up-frames t)) (display-buffer (get-buffer-create "foo"))))' This is with: GNU Emacs 23.0.60.4 (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' '--without-tiff'' My window manager is Sawfish 1.3. Helmut.