From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: mouse-autoselect-window Date: Fri, 07 Sep 2007 10:09:33 +0200 Message-ID: <878x7ihp6q.fsf@escher.local.home> References: <86abs1bd54.fsf@lola.quinscape.zz> <87myw1p8yb.fsf@escher.local.home> <46DEEF9F.5060904@gmx.at> <87r6lc0zqr.fsf@escher.local.home> <46DFF0FF.6060502@gmx.at> <87lkbj27zc.fsf@escher.local.home> <46E01859.1050709@gmx.at> <87d4wv238e.fsf@escher.local.home> <46E0395D.7010704@gmx.at> <878x7j1wr9.fsf@escher.local.home> <46E06708.8000001@gmx.at> <87zlzzz9ho.fsf@escher.local.home> <46E0F50F.4020701@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189152613 26544 80.91.229.12 (7 Sep 2007 08:10:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2007 08:10:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 07 10:10:14 2007 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.50) id 1ITYui-00086r-IX for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 10:10:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITYug-0007rd-6K for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 04:10:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITYuc-0007pp-O6 for emacs-devel@gnu.org; Fri, 07 Sep 2007 04:09:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITYub-0007mp-Ce for emacs-devel@gnu.org; Fri, 07 Sep 2007 04:09:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITYub-0007mg-A2 for emacs-devel@gnu.org; Fri, 07 Sep 2007 04:09:57 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ITYua-0003qe-Kq for emacs-devel@gnu.org; Fri, 07 Sep 2007 04:09:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ITYuL-00005p-UK for emacs-devel@gnu.org; Fri, 07 Sep 2007 10:09:41 +0200 Original-Received: from 87.123.210.255 ([87.123.210.255]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Sep 2007 10:09:41 +0200 Original-Received: from Stephen.Berman by 87.123.210.255 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Sep 2007 10:09:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 87.123.210.255 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78114 Archived-At: On Fri, 07 Sep 2007 08:51:59 +0200 martin rudalics wrote: >> The reason is that I had mouse-autoselect-window set to t, and >> handle-select-window contains this code: > > The incorrect behavior you reported (a window getting its modeline > highlighted but not the focus) was with `mouse-autoselect-window' t > then? When I first confirmed Drew Adams's report of this behavior, I had mouse-autoselect-window set to t. But I also see the same thing when it is set to a numerical value. >> So (numberp mouse-autoselect-window) => (numberp t) => nil and >> mouse-autoselect-window-start is skipped over. When I set >> mouse-autoselect-window to a number, I can use edebug to step through >> mouse-autoselect-window-select. The results I have gotten so far are >> puzzling. Sometimes (mouse-position) evaluates to e.g. (#> *scratch* 0x8656d88> 42 . 9) and then the variable `window' gets >> let-bound to #. But sometimes >> (mouse-position) evaluates to e.g. (# nil) >> and then `window' evaluates to nil. I haven't been able to see when >> or why this happens, but when it does, your code gets skipped over. > > As long as `window' is nil autoselection should continue looping, hence > this should not cause any harm. Autoselection should also continue > looping when the frame of `window' is not that of the selected window. I don't understand what you mean by "autoselection should continue looping", nor what harm it doesn't cause. >> But even when `window' has a valid window value, I find that in edebug >> (selected-window) evaluated to the same window, so again your code >> gets skipped over. But when I don't use edebug and move the mouse >> over another frame, then (selected-window) is still the window in the >> frame I moved off of. I don't understand this discrepancy, and I >> don't understand how (selected window) could change. > > It's hardly possible to avoid a Heisenbug here, I soon gave up using > edebug for this. Too bad, I often find edebug really helpful. Oh well, guess I just have to dirty my hands more with the code :-) Steve Berman