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#745: pop-to-buffer, frames, and input focus Date: Fri, 22 Aug 2008 18:39:20 +0200 Message-ID: <48AEEBB8.50201@gmx.at> References: <48AC2F4A.1000507@gmx.at> <48AC851A.3020906@gmx.at> <48AD2FB5.3000204@gmx.at> <48ADD085.50505@gmx.at> Reply-To: martin rudalics , 745@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219424907 28093 80.91.229.12 (22 Aug 2008 17:08:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Aug 2008 17:08:27 +0000 (UTC) Cc: 745@emacsbugs.donarmstrong.com To: Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 19:09:20 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 1KWa7u-0006z6-1I for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Aug 2008 19:08:42 +0200 Original-Received: from localhost ([127.0.0.1]:39261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWa6w-0002nZ-1i for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Aug 2008 13:07:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWa6o-0002nB-Pf for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2008 13:07:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWa6l-0002lK-MF for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2008 13:07:31 -0400 Original-Received: from [199.232.76.173] (port=50407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWa6k-0002lD-9L for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2008 13:07:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50571) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWa6j-0003qr-D9 for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2008 13:07:29 -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 m7MH7Rtv014065; Fri, 22 Aug 2008 10:07:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7MGo3le007405; Fri, 22 Aug 2008 09:50:03 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 22 Aug 2008 16:50:03 +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 745-submit@emacsbugs.donarmstrong.com id=B745.12194233075542 (code B ref 745); Fri, 22 Aug 2008 16:50:03 +0000 Original-Received: (at 745) by emacsbugs.donarmstrong.com; 22 Aug 2008 16:41:47 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7MGffJ3005535 for <745@emacsbugs.donarmstrong.com>; Fri, 22 Aug 2008 09:41:43 -0700 Original-Received: (qmail invoked by alias); 22 Aug 2008 16:41:35 -0000 Original-Received: from 62-47-63-165.adsl.highway.telekom.at (EHLO [62.47.63.165]) [62.47.63.165] by mail.gmx.net (mp003) with SMTP; 22 Aug 2008 18:41:35 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/yWv5ianTyWsuv0GlJojSi2CNtvyYvJ98u5CvPS0 03C29r07lh/4Xh User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Fri, 22 Aug 2008 13:07:31 -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:19641 Archived-At: >>> pop-to-buffer doesn't switch input focus with: Sawfish, kwin, >>> metacity, fluxbox, twm. >>> It does with icewm. >>> >>> display-buffer seems to switch focus with: Sawfish, kwin, fluxbox, >>> icewm, twm. >> You probably mean display-buffer does _not_ switch focus with these. > > I meant to say: display-buffer _does_ switch focus when creating a new > frame with those window managers: Sawfish, kwin, fluxbox, icewm, twm. I still don't understand. Simplistically spoken, `pop-to-buffer' is `display-buffer' + `select-window'. How can, using Sawfish say, `display-buffer' switch focus and `pop-to-buffer' not switch focus? >>> I still think that display-buffer should neither select the other frame >>> nor give it the input focus. (Whether the other frame should be raised >>> or not should probably be customizable, but that's a minor issue.) >> I agree with you but I'm afraid there were issues with this. If you >> have some spare time please look at the threads starting with >> >> http://lists.gnu.org/archive/html/emacs-devel/2006-04/msg00922.html >> >> http://lists.gnu.org/archive/html/emacs-devel/2005-11/msg00107.html >> >> http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00946.html >> >> respectively. At the very least you will find out that you're not >> alone. > > Those messages are several years old. And it looks like nobody is > going to fix the issue this time. We should fix it this time. Please try again two things with the window-managers you listed above and `pop-up-frames' non-nil: - tell whether `display-buffer' does switch focus. - tell whether `pop-to-buffer' does switch focus. - try both, if possible, with click-to-focus and a focus-follows-mouse settings (maybe you have to set the value of the Emacs variable `focus-follows-mouse' appropriately). Here on Windos XP with a focus-follows-mouse policy, `display-buffer' and `pop-to-buffer' both switch focus. IIRC, people reported troubles with the standard click-to-focus policy. Honestly, I'm a bit reluctant to try out click-to-focus here, maybe someone else can try? > Maybe we could move the input focus to the selected frame in a lazy > fashion. E.g. when Emacs waits for new events, we could compare the > currently focused frame with the selected frame, and if they differ we > could switch the focus to the selected frame. This would make > select-frame more useful. I suppose we should introduce a customizable variable which allows to call `select-frame-set-input-focus' (or something similar) at least in `pop-to-buffer' but maybe also in `display-buffer'. But we should also provide a doc-string recommending what setting this variable should have on which platform. martin