From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: md5i@cs.cmu.edu Newsgroups: gmane.emacs.devel Subject: Re: select-window and select-frame Date: Tue, 29 Oct 2002 10:43:25 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: 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 1035906414 20731 80.91.224.249 (29 Oct 2002 15:46:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2002 15:46:54 +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 186YZx-0005OD-00 for ; Tue, 29 Oct 2002 16:46:53 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 186Yed-0008DO-00 for ; Tue, 29 Oct 2002 16:51:43 +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 186YXe-0008R3-00; Tue, 29 Oct 2002 10:44:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 186YX0-0007Z7-00 for emacs-devel@gnu.org; Tue, 29 Oct 2002 10:43:50 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 186YWr-0007FQ-00 for emacs-devel@gnu.org; Tue, 29 Oct 2002 10:43:47 -0500 Original-Received: from miyazima.lti.cs.cmu.edu ([128.2.178.242]) by monty-python.gnu.org with smtp (Exim 4.10) id 186YWq-0007DJ-00; Tue, 29 Oct 2002 10:43:40 -0500 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 26 Oct 2002 16:14:13 -0400") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Source-Info: Sender is really md5i+@miyazima.lti.cs.cmu.edu 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:8910 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8910 Richard Stallman writes: > 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? > > One idea is that save-selected-window could also save and restore the > frame-selected-window of every frame. Another idea is to have two > different kinds of window-selection, one temporary and one "for real". > Both of these changes would have major ramifications, and so does the > solution I implemented. It is not clear what to do. How much code depends on select-window changing the selected window in a non-selected frame? How much code walks through all windows wrapped in `save-selected-window'? We can choose which change to use based on this. The original problem I found was in which-func.el, which used the `save-selected-window' idiom. Maybe for code like this we can add a function called `save-frame-selected-winows' which saves and restores all the frames' selected windows, but only when we think it is necessary. -- Michael Welsh Duggan (md5i@cs.cmu.edu)