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#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Date: Sat, 25 Oct 2008 19:00:39 +0200 Message-ID: <490350B7.1050902@gmx.at> References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490207D7.3010100@gmx.at> <49031EEC.7020809@gmx.at> Reply-To: martin rudalics , 1237@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 1224955821 25949 80.91.229.12 (25 Oct 2008 17:30:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2008 17:30:21 +0000 (UTC) Cc: 1237@emacsbugs.donarmstrong.com To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 19:31:23 2008 connect(): Connection refused 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 1Ktmyw-0006NU-Lf for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 19:31:22 +0200 Original-Received: from localhost ([127.0.0.1]:34530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktmxq-0006x4-Ks for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Oct 2008 13:30:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ktmxm-0006wJ-BX for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 13:30:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ktmxk-0006vG-IY for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 13:30:09 -0400 Original-Received: from [199.232.76.173] (port=48222 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ktmxk-0006vC-Ew for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 13:30:08 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38713) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ktmxk-0003oG-BF for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2008 13:30:08 -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 m9PHU2MT003847; Sat, 25 Oct 2008 10:30:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9PHA5BC031647; Sat, 25 Oct 2008 10:10:05 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 25 Oct 2008 17:10:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1237 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1237-submit@emacsbugs.donarmstrong.com id=B1237.122495415329513 (code B ref 1237); Sat, 25 Oct 2008 17:10:05 +0000 Original-Received: (at 1237) by emacsbugs.donarmstrong.com; 25 Oct 2008 17:02:33 +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 m9PH2Qvt029507 for <1237@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 10:02:28 -0700 Original-Received: (qmail invoked by alias); 25 Oct 2008 17:02:20 -0000 Original-Received: from 88-117-38-144.adsl.highway.telekom.at (EHLO [88.117.38.144]) [88.117.38.144] by mail.gmx.net (mp061) with SMTP; 25 Oct 2008 19:02:21 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18Wde0oYM0W0cvfHeHba4fIQsQCVQP730cf47fnny vnhn+wiVQMTLX4 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 25 Oct 2008 13:30:09 -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:21894 Archived-At: > Would it suffice if `run_window_configuration_change_hook' re-selected > the selected window at the end? i.e., It should handle your two windows case. I'm not sure what happens with three or more windows. The problem is that we want the _least_ recently used window and the `select-window' would not fix anything messed up down there. In some sense this virtual list of windows ordered by their use_time gets rotated with every call of `walk-windows'. The real problem is the unholy combination of run_window_configuration_change_hook and `walk-windows'. The former carefully selects each window _without_ recording it and the latter annihilates the former's efforts by selecting the window _and_ recording it. I tried with a `save-selected-window-norecord' macro and equipped `set-frame-selected-window' with an extra "norecord" parameter. This works but is quite clumsy. Also, I'm by no means sure whether the effect of recorded selecting a window within `walk-windows' might have been considered a feature by other callers. martin