From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: The window-pub branch Date: Tue, 7 Dec 2010 09:43:27 -0800 Message-ID: <2E2DF95135DA4B8F9F96C1AEA1D6C606@us.oracle.com> References: <4CE56872.6050502@gmx.de><4CE6A9C3.5060400@gmx.de> <4CE792B7.7090406@gmx.at><4CE7DEAB.8030401@gmx.de> <4CE80D77.10801@gmx.at><4CE83A6B.6090904@gmx.de> <4CE8EB28.3060607@gmx.at><4CE91FED.9060705@gmx.de> <4CE95C04.1090905@gmx.at> <4CEA3A75.50100@gmx.at><4CEA514F.2030901@gmx.de> <4CEA53A5.9080009@gmx.at><4CEA575E.5020607@gmx.de> <4CEA78DB.6010107@gmx.at> <4CEAA8C5.6080503@gmx.at> <4CEB703A.4070309@gmx.at> <4CEBDE5B.1070904@gmx.at><4CEBF770.6080309@gmx.at> <4CFA8432.5000708@gmx.de><4CFB7B30.9030309@gmx.at> <4CFBF5CE.9090200@gmx.de><4CFCAB94.5010208@gmx.at> <4CFD20DF.4000701@gmx.de><4CFD3C78.8050102@gmx.at> <4CFD671B.5010502@gmx.de> <4CFDEDD2.6060402@gmx.at> <0AC0EE7C394E4356B0D6A3E25A26B470@us.oracle.com> <4CFE6786.7010705@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291743885 5869 80.91.229.12 (7 Dec 2010 17:44:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 17:44:45 +0000 (UTC) Cc: 'grischka' , 'Stefan Monnier' , emacs-devel@gnu.org To: "'martin rudalics'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 07 18:44:41 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQ1af-0000nY-OG for ged-emacs-devel@m.gmane.org; Tue, 07 Dec 2010 18:44:38 +0100 Original-Received: from localhost ([127.0.0.1]:43534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQ1af-0001yS-26 for ged-emacs-devel@m.gmane.org; Tue, 07 Dec 2010 12:44:37 -0500 Original-Received: from [140.186.70.92] (port=52767 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQ1aU-0001wB-G9 for emacs-devel@gnu.org; Tue, 07 Dec 2010 12:44:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQ1aT-0001pI-Ca for emacs-devel@gnu.org; Tue, 07 Dec 2010 12:44:26 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:27250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQ1aT-0001p2-6F for emacs-devel@gnu.org; Tue, 07 Dec 2010 12:44:25 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oB7HiGWY019993 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Dec 2010 17:44:19 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oB6IHCHQ006612; Tue, 7 Dec 2010 17:44:14 GMT Original-Received: from abhmt010.oracle.com by acsmt353.oracle.com with ESMTP id 852679441291743809; Tue, 07 Dec 2010 09:43:29 -0800 Original-Received: from dradamslap1 (/10.159.219.164) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Dec 2010 09:43:28 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4CFE6786.7010705@gmx.at> Thread-Index: AcuWL+M5seggtx4kTSCxW6aoM4SzZQAA0xlg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133510 Archived-At: > > > M-: (select-window (get-buffer-window "*scratch*" t)) ... > > A clear bug? Why? > > Because the doc-string of `select-window' says that "Most editing will > apply to WINDOW's buffer" and that of `selected-window' says "The > selected window is the window ... to which many commands apply". And all of that is true. But you are not using only `select-window' here. You are using `select-window' in the context of `M-:', that is, in the context of a command. Imagine if I told you that there was a bug in `select-window' just because evaluating this sexp doesn't end up with buffer foo's window being selected: (save-selected-window (select-window (get-buffer-window "foo"))) You would say I'm nuts: `select-window' does select foo's window, but then the original window selection gets restored by `save-selected-window'. M-: is like that. `select-window' _does_ select the window in your test case. But M-: then restores the original window selection and frame focus. And you can see this clearly with the example I gave: just use (progn (select-window...) (insert "TEXT")). When you use M-: you are not just evaluating a sexp. You are using a command that evaluates a sexp and then restores the window selection. If you want to test the behavior of `select-window' then don't bring other stuff into the mix as well. > Moreover the modeline of the *scratch* window indicates that > the window is selected Which it is. This is just further proof of that fact. > (which is completely disconcerting when the two frames do > not overlap) while input goes to the other frame. No, input does not go to the other frame. Not during the evaluation of the sexp given to M-:. It is only _after_ M-: is finished that further input goes to the window that was originally selected. Do the text inserting in the sexp passed to M-: and you will see that it goes where you expect. Do the text inserting after M-: and it goes in the window that was selected before (and after) M-:. > The problem is within the interaction between Emacs and the window > manager. It does not depend on M-:. What problem? The fact that _after_ M-: the same window is selected as before it? That behavior certainly _does_ depend on M-:. You have not shown any bug in `select-window'. You've just gotten confused because M-: does not only evaluate a sexp. Take M-: out of the equation and then try to demonstrate the supposed `select-window' bug.