From triska@gmx.at Fri Oct 24 03:28:22 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Oct 2008 10:28:22 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OASJm1026023 for ; Fri, 24 Oct 2008 03:28:20 -0700 Received: from mail.gnu.org ([199.232.76.166]:34723 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KtJrK-0007lG-I9 for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:25:35 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KtJtv-00059d-2Q for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:28:17 -0400 Received: from mail.gmx.net ([213.165.64.20]:60554) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KtJtu-00058w-9j for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:28:14 -0400 Received: (qmail invoked by alias); 24 Oct 2008 10:27:41 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp013) with SMTP; 24 Oct 2008 12:27:41 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX18eBjAtYMcentZsOP2PiCVzRolej2xBBO9kGgJram enXl3K0AdnIBm/ Received: by mt-computer.local (Postfix, from userid 502) id 972E2B43B34; Fri, 24 Oct 2008 12:27:30 +0200 (CEST) From: Markus Triska To: emacs-pretest-bug@gnu.org Subject: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Message-Id: <20081024102730.972E2B43B34@mt-computer.local> Date: Fri, 24 Oct 2008 12:27:30 +0200 (CEST) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. When you do: $ emacs -Q -f linum-mode and then: C-x 2 you obtain one frame with two windows, the one on top being selected. When you then do: M-: (switch-to-buffer-other-window "test") RET the selected window is unexpectedly reused to display the new buffer. In GNU Emacs 23.0.60.11 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9) of 2008-10-14 on mt-computer.local Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t From rudalics@gmx.at Fri Oct 24 05:29:37 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 24 Oct 2008 12:29:37 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9OCTXUi023603 for <1237@emacsbugs.donarmstrong.com>; Fri, 24 Oct 2008 05:29:35 -0700 Received: (qmail invoked by alias); 24 Oct 2008 12:29:27 -0000 Received: from 62-47-36-89.adsl.highway.telekom.at (EHLO [62.47.36.89]) [62.47.36.89] by mail.gmx.net (mp059) with SMTP; 24 Oct 2008 14:29:27 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+KMtIE8kyKotrqQMSp9VWmTFqEYIDjvHs9uPbMz7 SiUVofWDI3ry0H Message-ID: <4901BF54.6020908@gmx.at> Date: Fri, 24 Oct 2008 14:28:04 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Markus Triska CC: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> In-Reply-To: <20081024102730.972E2B43B34@mt-computer.local> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 > When you do: > > $ emacs -Q -f linum-mode > > and then: > > C-x 2 > > you obtain one frame with two windows, the one on top being selected. > > When you then do: > > M-: (switch-to-buffer-other-window "test") RET > > the selected window is unexpectedly reused to display the new buffer. FWIW, the problem seems that `linum-mode' indirectly changes the value of windows' use_time so the value returned by `get-lru-window' is messy. use_time is updated by `select-window', hence a potential culprit is `walk-windows' which is used by `linum-mode'. Could you try to find out whether my guess is correct and/or where and how use_time is set when `linum-mode' is active? Thanks, martin From markus.triska@gmx.at Fri Oct 24 07:06:40 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 24 Oct 2008 14:06:41 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9OE6ac5016463 for <1237@emacsbugs.donarmstrong.com>; Fri, 24 Oct 2008 07:06:38 -0700 Received: (qmail invoked by alias); 24 Oct 2008 14:06:31 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp019) with SMTP; 24 Oct 2008 16:06:31 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX18PE198smIPz463SXqxnbUo/5UJyubeCdqMzBbCY3 xNmyprl+XdkWef Received: by mt-computer.local (Postfix, from userid 502) id B7803B441FA; Fri, 24 Oct 2008 16:06:17 +0200 (CEST) From: Markus Triska To: martin rudalics Cc: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> Date: Fri, 24 Oct 2008 16:06:17 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.79 martin rudalics writes: > of windows' use_time so the value returned by `get-lru-window' is messy. > use_time is updated by `select-window', hence a potential culprit is > `walk-windows' which is used by `linum-mode'. You are right that `get-lru-window' seems not to do the right thing in effect (it evaluates to the currently selected window even though there is another one in the frame). `select-window' seems not to be called in `walk-windows' as used by linum though, since the third argument is not a frame. I found that when you set `window-configuration-change-hook' to nil in *scratch* before `switch-to-buffer-other-window', it chooses the right buffer. I do not yet know if/where use_time changes. From rudalics@gmx.at Fri Oct 24 07:47:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 24 Oct 2008 14:47:04 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9OEkv5I026002 for <1237@emacsbugs.donarmstrong.com>; Fri, 24 Oct 2008 07:46:58 -0700 Received: (qmail invoked by alias); 24 Oct 2008 14:46:51 -0000 Received: from 62-47-50-225.adsl.highway.telekom.at (EHLO [62.47.50.225]) [62.47.50.225] by mail.gmx.net (mp041) with SMTP; 24 Oct 2008 16:46:51 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+rgzNmtkGrc6m1rQ6c3xoyeYncDDG+syzBIWQv0B 4Rt2WexLan6I2C Message-ID: <4901DFA1.2010503@gmx.at> Date: Fri, 24 Oct 2008 16:45:53 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Markus Triska CC: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 > I found that when you set `window-configuration-change-hook' to > nil in *scratch* before `switch-to-buffer-other-window', it chooses the > right buffer. Does it change anything when you remove the `walk-windows' from your function? Then we would know that `walk-windows' is responsible for triggering it. Maybe run_window_configuration_change_hook messes it up after `walk-windows'. > I do not yet know if/where use_time changes. Could you try to run this with GDB, set a breakpoint in select_window at the XSETFASTINT (w->use_time, window_select_count); line, and get a backtrace when(ever) this is hit for the lower window? martin From markus.triska@gmx.at Fri Oct 24 08:43:22 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 24 Oct 2008 15:43:23 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9OFhIBY007272 for <1237@emacsbugs.donarmstrong.com>; Fri, 24 Oct 2008 08:43:20 -0700 Received: (qmail invoked by alias); 24 Oct 2008 15:43:09 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp042) with SMTP; 24 Oct 2008 17:43:09 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1/P6qkREE7P7s6l9heqZoC0RvLaEe1+bpqQMr/vT5 YjGGs/Zya/SpDc Received: by mt-computer.local (Postfix, from userid 502) id 31FD3B4435B; Fri, 24 Oct 2008 17:42:54 +0200 (CEST) From: Markus Triska To: martin rudalics Cc: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> Date: Fri, 24 Oct 2008 17:42:54 +0200 In-Reply-To: <4901DFA1.2010503@gmx.at> (martin rudalics's message of "Fri, 24 Oct 2008 16:45:53 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.76 I constructed the following self-contained case that I hope helps you: (defun my-walk () (walk-windows 'identity)) (add-hook 'window-configuration-change-hook 'my-walk nil t) (split-window) (switch-to-buffer-other-window "test") If you put these forms in the *scratch* buffer of "emacs -Q" and then evaluate them one after another, you should be able to see the problem. The problem does not occur if the hook is NOT made buffer-local. From rudalics@gmx.at Fri Oct 24 10:38:54 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 24 Oct 2008 17:38:55 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9OHcpYZ003516 for <1237@emacsbugs.donarmstrong.com>; Fri, 24 Oct 2008 10:38:52 -0700 Received: (qmail invoked by alias); 24 Oct 2008 17:38:45 -0000 Received: from 88-117-43-164.adsl.highway.telekom.at (EHLO [88.117.43.164]) [88.117.43.164] by mail.gmx.net (mp014) with SMTP; 24 Oct 2008 19:38:45 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+ABWBfCBaAPbksrFyH8X1GP8yNDHDJGc1V7QAH0L 7AwRYKBUq1Pzb6 Message-ID: <490207D7.3010100@gmx.at> Date: Fri, 24 Oct 2008 19:37:27 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Markus Triska CC: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 > (defun my-walk () (walk-windows 'identity)) > > (add-hook 'window-configuration-change-hook 'my-walk nil t) > > (split-window) > > (switch-to-buffer-other-window "test") > > If you put these forms in the *scratch* buffer of "emacs -Q" and then > evaluate them one after another, you should be able to see the problem. > The problem does not occur if the hook is NOT made buffer-local. Yes. Replacing `split-window' by (progn (split-window) (message "sel %s .. lru %s" (selected-window) (get-lru-window))) shows the problem immediately. Everything seems alright when you put that message into my-walk. run_window_configuration_change_hook selects each window before running the hook buffer-locally which makes any reasoning (within the function run by the hook) about which window will be selected when the command completes void. In addition it unwinds with select_window_norecord which won't restore the current buffer when the selected window gets reselected. Both of these don't explain the problem that somewhere `select-window' must get called with norecord nil :-( martin From rudalics@gmx.at Sat Oct 25 06:29:51 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 25 Oct 2008 13:29:51 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9PDTksg008646 for <1237@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 06:29:48 -0700 Received: (qmail invoked by alias); 25 Oct 2008 13:29:41 -0000 Received: from 62-47-38-115.adsl.highway.telekom.at (EHLO [62.47.38.115]) [62.47.38.115] by mail.gmx.net (mp028) with SMTP; 25 Oct 2008 15:29:41 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/gdZpjqO/gVdyCHweOM5t2wFz7fcrBOyABR4YnWK nfUJj2o5Xn92Ez Message-ID: <49031EEC.7020809@gmx.at> Date: Sat, 25 Oct 2008 15:28:12 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1237@debbugs.gnu.org CC: Markus Triska Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490207D7.3010100@gmx.at> In-Reply-To: <490207D7.3010100@gmx.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.76 > run_window_configuration_change_hook selects each window before running > the hook buffer-locally which makes any reasoning (within the function > run by the hook) about which window will be selected when the command > completes void. In addition it unwinds with select_window_norecord > which won't restore the current buffer when the selected window gets > reselected. Both of these don't explain the problem that somewhere > `select-window' must get called with norecord nil :-( OK. The reason may be twofold: `save-selected-window' may twice select a window with norecord nil: (set-frame-selected-window (car elt) (cdr elt)))) ; <--- here (if (window-live-p save-selected-window-window) (select-window save-selected-window-window)))))) <--- and here Fixing these two fixes the bug. I have to find out how to do this in an unobtrusive way though. martin, who'd never ever run `window-configuration-change-hook' buffer-locally in the first place ;-) From markus.triska@gmx.at Sat Oct 25 09:09:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 25 Oct 2008 16:09:44 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9PG9enu016362 for <1237@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 09:09:42 -0700 Received: (qmail invoked by alias); 25 Oct 2008 16:09:34 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp057) with SMTP; 25 Oct 2008 18:09:34 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1+VJadkNUqVPSkMYPCTLGN54I88RwSpfdFsShGFpV VcMZjWasS1ZlQn Received: by mt-computer.local (Postfix, from userid 502) id EBA67B45BEC; Sat, 25 Oct 2008 18:09:28 +0200 (CEST) From: Markus Triska To: martin rudalics Cc: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490207D7.3010100@gmx.at> <49031EEC.7020809@gmx.at> Date: Sat, 25 Oct 2008 18:09:28 +0200 In-Reply-To: <49031EEC.7020809@gmx.at> (martin rudalics's message of "Sat, 25 Oct 2008 15:28:12 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 martin rudalics writes: > (set-frame-selected-window (car elt) (cdr elt)))) ; <--- here > (if (window-live-p save-selected-window-window) > (select-window save-selected-window-window)))))) <--- and here > > Fixing these two fixes the bug. I have to find out how to do this in an > unobtrusive way though. Would it suffice if `run_window_configuration_change_hook' re-selected the selected window at the end? i.e., 2008-10-25 Markus Triska * window.c (run_window_configuration_change_hook): Re-select the selected window, to get the most recently used window right. diff --git a/src/window.c b/src/window.c index 5931955..28e089a 100644 --- a/src/window.c +++ b/src/window.c @@ -3382,6 +3382,9 @@ run_window_configuration_change_hook (struct frame *f) } } + /* Make sure that the selected window remains most recently used. */ + Fselect_window (Fselected_window (), Qnil); + run_funs (global_wcch); unbind_to (count, Qnil); } From rudalics@gmx.at Sat Oct 25 10:02:33 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 25 Oct 2008 17:02:33 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m9PH2Qvt029507 for <1237@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 10:02:28 -0700 Received: (qmail invoked by alias); 25 Oct 2008 17:02:20 -0000 Received: from 88-117-38-144.adsl.highway.telekom.at (EHLO [88.117.38.144]) [88.117.38.144] by mail.gmx.net (mp061) with SMTP; 25 Oct 2008 19:02:21 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18Wde0oYM0W0cvfHeHba4fIQsQCVQP730cf47fnny vnhn+wiVQMTLX4 Message-ID: <490350B7.1050902@gmx.at> Date: Sat, 25 Oct 2008 19:00:39 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Markus Triska CC: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490207D7.3010100@gmx.at> <49031EEC.7020809@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 > Would it suffice if `run_window_configuration_change_hook' re-selected > the selected window at the end? i.e., It should handle your two windows case. I'm not sure what happens with three or more windows. The problem is that we want the _least_ recently used window and the `select-window' would not fix anything messed up down there. In some sense this virtual list of windows ordered by their use_time gets rotated with every call of `walk-windows'. The real problem is the unholy combination of run_window_configuration_change_hook and `walk-windows'. The former carefully selects each window _without_ recording it and the latter annihilates the former's efforts by selecting the window _and_ recording it. I tried with a `save-selected-window-norecord' macro and equipped `set-frame-selected-window' with an extra "norecord" parameter. This works but is quite clumsy. Also, I'm by no means sure whether the effect of recorded selecting a window within `walk-windows' might have been considered a feature by other callers. martin From monnier@iro.umontreal.ca Sat Oct 25 12:08:20 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 25 Oct 2008 19:08:20 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9PJ8HDJ029017 for <1237@emacsbugs.donarmstrong.com>; Sat, 25 Oct 2008 12:08:18 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEADMLA0lFxLrB/2dsb2JhbACBdb5qg0+BDQ X-IronPort-AV: E=Sophos;i="4.33,484,1220241600"; d="scan'208";a="28859198" Received: from 69-196-186-193.dsl.teksavvy.com (HELO pastel.home) ([69.196.186.193]) by ironport2-out.teksavvy.com with ESMTP; 25 Oct 2008 15:08:11 -0400 Received: by pastel.home (Postfix, from userid 20848) id AC1078E6C; Sat, 25 Oct 2008 15:08:10 -0400 (EDT) From: Stefan Monnier To: Markus Triska Cc: 1237@debbugs.gnu.org, martin rudalics Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Message-ID: References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> Date: Sat, 25 Oct 2008 15:08:10 -0400 In-Reply-To: (Markus Triska's message of "Fri, 24 Oct 2008 17:42:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I constructed the following self-contained case that I hope helps you: > (defun my-walk () (walk-windows 'identity)) > (add-hook 'window-configuration-change-hook 'my-walk nil t) > (split-window) > (switch-to-buffer-other-window "test") In Emacs-22, window-configuration-change-hook did not work correctly with buffer-local hooks, but in some cases you could make it work somewhat by using `walk-window' in your hook to try and cover all the affected windows. With the code I installed to properly support buffer-local hooks on window-configuration-change-hook, the walk-window should be unnecessary, so the patch below should not break linum and might remove the problem. This said, walk-windows should probably use `norecord', what do people think? Stefan === modified file 'lisp/linum.el' --- lisp/linum.el 2008-08-31 19:46:54 +0000 +++ lisp/linum.el 2008-10-25 19:06:30 +0000 @@ -82,17 +82,22 @@ 'linum-update-current) nil t) (add-hook 'after-change-functions 'linum-after-change nil t)) (add-hook 'window-scroll-functions 'linum-after-scroll nil t) + ;; FIXME: using both window-size-change-functions and + ;; window-configuration-change-hook seems redundant. (add-hook 'window-size-change-functions 'linum-after-size nil t) (add-hook 'change-major-mode-hook 'linum-delete-overlays nil t) (add-hook 'window-configuration-change-hook - 'linum-after-config nil t) + ;; FIXME: If the buffer is shows in N windows, this + ;; will be called N times rather than once. We should use + ;; something like linum-update-window instead. + 'linum-update-current nil t) (linum-update-current)) (remove-hook 'post-command-hook 'linum-update-current t) (remove-hook 'post-command-hook 'linum-schedule t) (remove-hook 'window-size-change-functions 'linum-after-size t) (remove-hook 'window-scroll-functions 'linum-after-scroll t) (remove-hook 'after-change-functions 'linum-after-change t) - (remove-hook 'window-configuration-change-hook 'linum-after-config t) + (remove-hook 'window-configuration-change-hook 'linum-update-current t) (remove-hook 'change-major-mode-hook 'linum-delete-overlays t) (linum-delete-overlays))) From news@novembaer.univie.ac.at Wed Oct 29 06:26:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Oct 2008 13:26:03 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9TDQ0Sk011934 for ; Wed, 29 Oct 2008 06:26:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvB3f-0003eD-Ol for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 09:25:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvB3d-0003cu-JB for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 09:25:58 -0400 Received: from [199.232.76.173] (port=38951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvB3d-0003cm-ES for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 09:25:57 -0400 Received: from pinatubo-2.switch.ch ([130.59.1.10]:35631 helo=pinatubo.switch.ch) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvB3c-0001Uc-Rq for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 09:25:57 -0400 Received: from [193.171.255.22] (helo=novembaer.univie.ac.at) by pinatubo.switch.ch with esmtp (Exim 4.63) (envelope-from ) id 1KvB3b-0007iq-Se for gnu-emacs-bug@moderators.isc.org; Wed, 29 Oct 2008 14:25:55 +0100 Received: from news by novembaer.univie.ac.at with local (Exim 4.20) id 1KvB3b-0007cQ-3o for gnu-emacs-bug@moderators.isc.org; Wed, 29 Oct 2008 14:25:55 +0100 To: gnu-emacs-bug@moderators.isc.org From: Markus Triska Newsgroups: gnu.emacs.bug Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> Date: Wed, 29 Oct 2008 14:25:54 +0100 Message-ID: Cancel-Lock: sha1:ZENuFtALKvIjAiSyztljKsVsrzs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 7 NNTP-Posting-Host: pns-200-217.demo.tuwien.ac.at X-Trace: 1225286755 tunews.univie.ac.at 12126 128.131.200.217 X-Complaints-To: abuse@tuwien.ac.at Sender: X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Stefan Monnier writes: > This said, walk-windows should probably use `norecord', what do > people think? Yes, I find it very desirable that `walk-windows' have no side-effects. From lennart.borgman@gmail.com Wed Oct 29 15:15:16 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Oct 2008 22:15:16 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9TMFCrN018428 for ; Wed, 29 Oct 2008 15:15:13 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvJJn-00065E-Vx for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 18:15:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvJJl-00064t-UI for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 18:15:11 -0400 Received: from [199.232.76.173] (port=50480 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvJJl-00064q-Oe for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 18:15:09 -0400 Received: from pinatubo-2.switch.ch ([130.59.1.10]:46483 helo=pinatubo.switch.ch) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvJJl-0002OT-JA for bug-gnu-emacs@gnu.org; Wed, 29 Oct 2008 18:15:09 -0400 Received: from [66.249.92.174] (helo=ug-out-1314.google.com) by pinatubo.switch.ch with esmtp (Exim 4.63) (envelope-from ) id 1KvJJk-0003Vf-0X for gnu-emacs-bug@moderators.isc.org; Wed, 29 Oct 2008 23:15:08 +0100 Received: by ug-out-1314.google.com with SMTP id m2so1034178ugc.30 for ; Wed, 29 Oct 2008 15:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ah4EcjCkM74rS9Z2i78AFLkSMRytx0oS7Arfh2xIel8=; b=ZfbbcqfmPiQnzZbWGRFcCxgCyNevzX9DI7Wft1Z1rFo5dmCoxuQ7OOUH4/ZeVzHBO5 C823bB3vnsqhhii0hM30cx1+mpZY7QHrb86Eqe4JE8xosu+RzISqrYKj39W+3wspfUgM WM5pkBuOQCv7ebG5TeSN6Kt6Frgf8Mw6FRt0c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=jRSHvVz7tRf+mSvuP2G7eqeEhS7TvFEsTplG2F4DnGh/Z3JjHB7scQPrEdxxpbGUqY D+hA/uuWN9wI/gPBnIQ/NNHy4kZryNeyA+nVainz3PoSsqYLCfPFEALtHRVl0bZ2Bpg5 xD//MXt7fBHdaefqKnCKwLQZiEce7Hcd41ds0= Received: by 10.86.4.14 with SMTP id 14mr6219201fgd.76.1225318507023; Wed, 29 Oct 2008 15:15:07 -0700 (PDT) Received: by 10.86.65.3 with HTTP; Wed, 29 Oct 2008 15:15:06 -0700 (PDT) Message-ID: Date: Wed, 29 Oct 2008 23:15:06 +0100 From: "Lennart Borgman" To: "Markus Triska" , 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Cc: gnu-emacs-bug@moderators.isc.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-CrossAssassin-Score: 2 On Wed, Oct 29, 2008 at 2:25 PM, Markus Triska wrote: > Stefan Monnier writes: > >> This said, walk-windows should probably use `norecord', what do >> people think? > > Yes, I find it very desirable that `walk-windows' have no side-effects. Me too. From rudalics@gmx.at Sat Nov 1 11:08:21 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 1 Nov 2008 18:08:22 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mA1I8Hnm009588 for <1237@emacsbugs.donarmstrong.com>; Sat, 1 Nov 2008 11:08:19 -0700 Received: (qmail invoked by alias); 01 Nov 2008 18:08:10 -0000 Received: from 62-47-62-142.adsl.highway.telekom.at (EHLO [62.47.62.142]) [62.47.62.142] by mail.gmx.net (mp035) with SMTP; 01 Nov 2008 19:08:11 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18oC9lxptoow2B7f9qFU+WOHoJjrwKcu0csf93VrN oXERcN313oFTnv Message-ID: <490C9A90.40407@gmx.at> Date: Sat, 01 Nov 2008 19:06:08 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.76 I've been looking into this and found out that in order to fix problems in this area we need an optional "norecord" argument for `select-frame' and `set-frame-selected-window'. Both of these may (indirectly) call `select-window' and thus mess with the order of recently selected windows (and probably also the buffer list). As a rule, the norecord argument would be set by `with-selected-window' and `with-selected-frame' in addition to `walk-windows'. Personally, I'd set it in `save-selected-window' too, but this might break applications that rely on the implicit selection provided by the current mechanism. The changes are trivial and not very interesting to post. So please tell me whether you want them installed. martin From monnier@iro.umontreal.ca Sat Nov 1 19:16:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 2 Nov 2008 02:16:59 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA22GtPG004390 for <1237@emacsbugs.donarmstrong.com>; Sat, 1 Nov 2008 19:16:56 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgEALeqDElMCqyo/2dsb2JhbACBdscfg1KBDw X-IronPort-AV: E=Sophos;i="4.33,528,1220241600"; d="scan'208";a="29214967" Received: from 76-10-172-168.dsl.teksavvy.com (HELO pastel.home) ([76.10.172.168]) by ironport2-out.teksavvy.com with ESMTP; 01 Nov 2008 22:16:49 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8CF7A804B; Sat, 1 Nov 2008 22:16:47 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Message-ID: References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> Date: Sat, 01 Nov 2008 22:16:47 -0400 In-Reply-To: <490C9A90.40407@gmx.at> (martin rudalics's message of "Sat, 01 Nov 2008 19:06:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I've been looking into this and found out that in order to fix problems > in this area we need an optional "norecord" argument for `select-frame' > and `set-frame-selected-window'. Both of these may (indirectly) call > `select-window' and thus mess with the order of recently selected > windows (and probably also the buffer list). > As a rule, the norecord argument would be set by `with-selected-window' > and `with-selected-frame' in addition to `walk-windows'. Personally, > I'd set it in `save-selected-window' too, but this might break > applications that rely on the implicit selection provided by the current > mechanism. > The changes are trivial and not very interesting to post. So please > tell me whether you want them installed. That sounds good, please install them. Stefan From rudalics@gmx.at Sun Nov 2 03:15:28 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237-done) by emacsbugs.donarmstrong.com; 2 Nov 2008 11:15:29 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mA2BFODT010582 for <1237-done@emacsbugs.donarmstrong.com>; Sun, 2 Nov 2008 03:15:26 -0800 Received: (qmail invoked by alias); 02 Nov 2008 11:15:18 -0000 Received: from 62-47-59-174.adsl.highway.telekom.at (EHLO [62.47.59.174]) [62.47.59.174] by mail.gmx.net (mp007) with SMTP; 02 Nov 2008 12:15:18 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/rL/9H3WLrf9vn1u3l3nBl3NFxWWN6Qjk2Wbt0G3 rsGPqSbFHCsOrl Message-ID: <490D8B7D.3020008@gmx.at> Date: Sun, 02 Nov 2008 12:14:05 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1237-done@debbugs.gnu.org CC: Markus Triska Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> In-Reply-To: <20081024102730.972E2B43B34@mt-computer.local> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 Fixed as 2008-11-02 Martin Rudalics * window.el (save-selected-window-norecord): New macro (walk-windows): Use save-selected-window-norecord and call select-window with NORECORD set. (Bug#1237) Thanks for the report, martin From rms@gnu.org Sun Nov 2 15:22:32 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-10.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Nov 2008 23:22:32 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA2NMTKG031807 for ; Sun, 2 Nov 2008 15:22:30 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwmH7-00043F-3g for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 18:22:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwmH5-00042T-2F for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 18:22:28 -0500 Received: from [199.232.76.173] (port=33314 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwmH4-00042J-Ta for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 18:22:26 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:49550) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KwmH4-0006nk-Lx for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 18:22:26 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KwmE9-0001K4-AY; Sun, 02 Nov 2008 18:19:25 -0500 Content-Type: text/plain; charset=ISO-8859-15 From: "Richard M. Stallman" To: Stefan Monnier , 1237@debbugs.gnu.org CC: rudalics@gmx.at, bug-submit-list@donarmstrong.com, 1237@debbugs.gnu.org, bug-gnu-emacs@gnu.org In-reply-to: (message from Stefan Monnier on Sat, 01 Nov 2008 22:16:47 -0400) Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Reply-to: rms@gnu.org References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> Message-Id: Date: Sun, 02 Nov 2008 18:19:25 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 > As a rule, the norecord argument would be set by `with-selected-window' > and `with-selected-frame' in addition to `walk-windows'. Personally, > I'd set it in `save-selected-window' too, but this might break > applications that rely on the implicit selection provided by the current > mechanism. I think it is very important to keep `with-selected-window' and `save-selected-window' similar. If we make this change in one, we had better make the change in the other too. From rudalics@gmx.at Sun Nov 2 23:20:04 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 3 Nov 2008 07:20:05 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mA37K082021038 for <1237@emacsbugs.donarmstrong.com>; Sun, 2 Nov 2008 23:20:02 -0800 Received: (qmail invoked by alias); 03 Nov 2008 07:19:55 -0000 Received: from 62-47-33-150.adsl.highway.telekom.at (EHLO [62.47.33.150]) [62.47.33.150] by mail.gmx.net (mp043) with SMTP; 03 Nov 2008 08:19:55 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+Kg7db9myKq59OyRyhP3lxVf4jOxvNBkPIv2XEz6 9e1KF9E+HB/Dxe Message-ID: <490EA570.6060705@gmx.at> Date: Mon, 03 Nov 2008 08:17:04 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: rms@gnu.org CC: Stefan Monnier , 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.77 > I think it is very important to keep `with-selected-window' > and `save-selected-window' similar. If we make this change > in one, we had better make the change in the other too. I think so too. But the behavior was different (in the NORECORD aspect) already before my recent change. martin From rms@gnu.org Mon Nov 3 11:43:32 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-10.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 3 Nov 2008 19:43:32 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA3JhTTO012599 for <1237@emacsbugs.donarmstrong.com>; Mon, 3 Nov 2008 11:43:31 -0800 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kx5Hr-0004yZ-N8; Mon, 03 Nov 2008 14:40:31 -0500 Content-Type: text/plain; charset=ISO-8859-15 From: "Richard M. Stallman" To: martin rudalics CC: monnier@iro.umontreal.ca, 1237@debbugs.gnu.org In-reply-to: <490EA570.6060705@gmx.at> (message from martin rudalics on Mon, 03 Nov 2008 08:17:04 +0100) Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Reply-to: rms@gnu.org References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> <490EA570.6060705@gmx.at> Message-Id: Date: Mon, 03 Nov 2008 14:40:31 -0500 > I think it is very important to keep `with-selected-window' > and `save-selected-window' similar. If we make this change > in one, we had better make the change in the other too. I think so too. But the behavior was different (in the NORECORD aspect) already before my recent change. Was that intentional or was it a bug? From monnier@IRO.UMontreal.CA Mon Nov 3 12:49:42 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 3 Nov 2008 20:49:42 +0000 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA3KncOD028986 for <1237@emacsbugs.donarmstrong.com>; Mon, 3 Nov 2008 12:49:39 -0800 Received: from alfajor.home (vpn-132-204-232-112.acd.umontreal.ca [132.204.232.112]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id mA3KnaAa001222; Mon, 3 Nov 2008 15:49:36 -0500 Received: by alfajor.home (Postfix, from userid 20848) id 108F91C44D; Mon, 3 Nov 2008 15:49:35 -0500 (EST) From: Stefan Monnier To: rms@gnu.org Cc: martin rudalics , 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window Message-ID: References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> <490EA570.6060705@gmx.at> Date: Mon, 03 Nov 2008 15:49:35 -0500 In-Reply-To: (Richard M. Stallman's message of "Mon, 03 Nov 2008 14:40:31 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3139=0 >> I think it is very important to keep `with-selected-window' >> and `save-selected-window' similar. If we make this change >> in one, we had better make the change in the other too. > I think so too. But the behavior was different (in the NORECORD aspect) > already before my recent change. > Was that intentional or was it a bug? The fact that with-selected-window does not "record" it very much intentional. The "norecord" argument was added (to select-window) specifically for that purpose. I believe its absence in save-selected-window is only accidental. Stefan From rudalics@gmx.at Mon Nov 3 23:37:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1237) by emacsbugs.donarmstrong.com; 4 Nov 2008 07:37:03 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mA47axYK029694 for <1237@emacsbugs.donarmstrong.com>; Mon, 3 Nov 2008 23:37:00 -0800 Received: (qmail invoked by alias); 04 Nov 2008 07:36:53 -0000 Received: from 62-47-49-96.adsl.highway.telekom.at (EHLO [62.47.49.96]) [62.47.49.96] by mail.gmx.net (mp029) with SMTP; 04 Nov 2008 08:36:53 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/TLzxLOHTTYxQhmqteEj13M7BJE5/RHqnc2xQoii IU3hSyQUyHGkLk Message-ID: <490FFB49.6070102@gmx.at> Date: Tue, 04 Nov 2008 08:35:37 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stefan Monnier CC: rms@gnu.org, 1237@debbugs.gnu.org Subject: Re: bug#1237: 23.0.60; `switch-to-buffer-other-window' sometimes uses selected window References: <20081024102730.972E2B43B34@mt-computer.local> <4901BF54.6020908@gmx.at> <4901DFA1.2010503@gmx.at> <490C9A90.40407@gmx.at> <490EA570.6060705@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8100000000000001 > The fact that with-selected-window does not "record" it very > much intentional. The "norecord" argument was added (to select-window) > specifically for that purpose. > > I believe its absence in save-selected-window is only accidental. I hopefully removed all accidental absences by now ;-) martin From unknown Tue Jun 24 05:10:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Dec 2008 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator