From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: mouse-autoselect-window Date: Fri, 07 Sep 2007 08:51:59 +0200 Message-ID: <46E0F50F.4020701@gmx.at> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1189149660 17507 80.91.229.12 (7 Sep 2007 07:21:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2007 07:21:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 07 09:21:01 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 1ITY9A-0004n1-UV for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 09:20:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITY98-0000kq-QP for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2007 03:20:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITY8t-0000TN-Kf for emacs-devel@gnu.org; Fri, 07 Sep 2007 03:20:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITY8s-0000RF-2j for emacs-devel@gnu.org; Fri, 07 Sep 2007 03:20:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITY8r-0000Qw-KX for emacs-devel@gnu.org; Fri, 07 Sep 2007 03:20:37 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ITY8r-0000KF-40 for emacs-devel@gnu.org; Fri, 07 Sep 2007 03:20:37 -0400 Original-Received: (qmail invoked by alias); 07 Sep 2007 06:53:56 -0000 Original-Received: from N951P013.adsl.highway.telekom.at (EHLO [62.47.62.205]) [62.47.62.205] by mail.gmx.net (mp028) with SMTP; 07 Sep 2007 08:53:56 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/Sae0KM67S2c08OE3+2kQteneVHdgKWdl7wXUo7G smTl9ANMQu8Erq User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87zlzzz9ho.fsf@escher.local.home> X-Y-GMX-Trusted: 0 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:78106 Archived-At: > 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? > 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. > 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.