From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: select-window and select-frame Date: Tue, 29 Oct 2002 14:36:08 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: <200210291936.g9TJa8R18412@rum.cs.yale.edu> References: <200210242348.g9ONmVr17119@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035920385 15115 80.91.224.249 (29 Oct 2002 19:39:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2002 19:39:45 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 186cDG-0003vd-00 for ; Tue, 29 Oct 2002 20:39:42 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 186cI1-00053v-00 for ; Tue, 29 Oct 2002 20:44:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 186cAv-0006CX-00; Tue, 29 Oct 2002 14:37:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 186c9s-0005VW-00 for emacs-devel@gnu.org; Tue, 29 Oct 2002 14:36:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 186c9p-0005Pk-00 for emacs-devel@gnu.org; Tue, 29 Oct 2002 14:36:11 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 186c9p-0005Ok-00; Tue, 29 Oct 2002 14:36:09 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g9TJa8R18412; Tue, 29 Oct 2002 14:36:08 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8927 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8927 > I think this change of behavior in select-window is bad and should > be reverted. It is incompatible and does break existing code. > > The solution I implemented seems to be bad, but it is not clear what a > good solution is. > > The original problem is that > > (save-selected-window > (select-window ...) > ..) > > can permanently alter the frame-selected-window of a frame. I tried > solving it by making select-window not alter the frame-selected-window > of a frame that isn't selected. If we don't solve it that way, we need > to solve it some other way, but what? The problem is not so much with the "don't alter the frame-selected-window of a frame that isn't selected" but with the fact that select-window does not select the window's frame any more. I think the best solution I can think of is to add an argument to select-window which controls whether to change the selected-frame or not (i.e. choose between the old and the new behavior). That means that code will need to be changed to fix the original problem, but it seems that the original problem is not as important as the problems introduced by the current fix. Maybe the default could even be controlled by a variable that could be temporarily bound by save-selected-window, although I'm not sure if that's a good idea or not. Stefan