From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Wrong window end reported after splitting window Date: Mon, 25 Feb 2008 11:09:31 -0500 Message-ID: References: <47C06B77.4040201@gmx.at> <47C09FFA.4040604@gmx.at> <47C1F0CA.9070804@gmx.at> <47C2CBB6.7020602@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203955827 17481 80.91.229.12 (25 Feb 2008 16:10:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2008 16:10:27 +0000 (UTC) Cc: Juanma Barranquero , Emacs Devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 25 17:10:52 2008 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 1JTfuT-00068H-3I for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2008 17:10:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTftx-0000FX-86 for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2008 11:10:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTftt-0000FS-LI for emacs-devel@gnu.org; Mon, 25 Feb 2008 11:09:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTfts-0000FG-7A for emacs-devel@gnu.org; Mon, 25 Feb 2008 11:09:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTfts-0000FD-2y for emacs-devel@gnu.org; Mon, 25 Feb 2008 11:09:56 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JTftr-00061D-ND for emacs-devel@gnu.org; Mon, 25 Feb 2008 11:09:55 -0500 Original-Received: from ceviche.home (vpn-132-204-232-208.acd.umontreal.ca [132.204.232.208]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m1PGA0RK022837 for ; Mon, 25 Feb 2008 11:10:02 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 88E7AB40C5; Mon, 25 Feb 2008 11:09:31 -0500 (EST) In-Reply-To: <47C2CBB6.7020602@gmx.at> (martin rudalics's message of "Mon, 25 Feb 2008 15:07:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: -2.5 X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-detected-kernel: by monty-python.gnu.org: 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:90408 Archived-At: >> I was thining of passing it implicitly as the selected-window, just as >> the selected-frame is passed implicitly for global >> window-configuration-change-hooks. > This would make it impossible for the function to guess which window is > selected after the configuration change and/or set the selected window. Right. But note that even the global hook is not currently really able to do that. At least it can't guess and/or set the selected frame. It hasn't been a problem AFAICT. I don't think it's a significant restriction. > BTW `window-size-change-functions' also passes only the frame as > argument. Yup. And it probably also fails to handle correctly buffer-local settings. > `window-scroll-functions' appears more intelligent. Because it does not apply to window-disposition so it only applies to a single window at a time, so figuring out which buffer to consider is immediately obvious. >>> BTW, shall I run it for the buffers of deleted windows too? >> I don't think it can be done (i.e. it would be a different hook). > Not doing it would obscure the semantics considerably - the global hook > gets run when a window is deleted, the local one not. I'm not convinced it's a problem. Again, it's a restriction but it's not clear that it will pose problems for actual users. After all, the current competition is easy to beat: buffer-local settings just plain fail to work reliably at all and they very much don't work for window-deletion already. >> They currently (incorrectly) use a buffer-local setting which needs to >> be run whenever set-window-buffer is set to display those buffers (so >> as to reset the [vh]scroll settings among other things). >> Making the hook global would make the code work right, but with the >> disadvantage that ...well... it would be global even though it's only >> needed when/where those buffers are displayed. > We should carefully reevaluate these hooks and how they are used. Maybe > it's better to provide a new hook then. Maybe. Stefan