From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32637: 27.0.50; window-size-change-functions not run from local hook Date: Thu, 06 Sep 2018 00:54:43 +0300 Organization: LINKOV.NET Message-ID: <87musv1ufw.fsf@mail.linkov.net> References: <87musx9dr1.fsf@mail.linkov.net> <5B8F8A0C.1030908@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536186169 5020 195.159.176.226 (5 Sep 2018 22:22:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2018 22:22:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32637@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 00:22:45 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxgCD-0001Aa-8U for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2018 00:22:45 +0200 Original-Received: from localhost ([::1]:58350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxgEJ-0005cS-Mi for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Sep 2018 18:24:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxgDW-0004gr-9J for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 18:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxgDU-0002FA-IW for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 18:24:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42463) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fxgDU-0002Ef-92 for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 18:24:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fxgDU-0002b8-2i for bug-gnu-emacs@gnu.org; Wed, 05 Sep 2018 18:24:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Sep 2018 22:24:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32637-submit@debbugs.gnu.org id=B32637.15361861829825 (code B ref 32637); Wed, 05 Sep 2018 22:24:04 +0000 Original-Received: (at 32637) by debbugs.gnu.org; 5 Sep 2018 22:23:02 +0000 Original-Received: from localhost ([127.0.0.1]:47466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxgCT-0002Y4-ON for submit@debbugs.gnu.org; Wed, 05 Sep 2018 18:23:02 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:49878 helo=pdx1-sub0-mail-a17.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fxgCR-0002Xs-Ci for 32637@debbugs.gnu.org; Wed, 05 Sep 2018 18:22:59 -0400 Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTP id 7426A7FD08; Wed, 5 Sep 2018 15:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=vYyo+OGphougwfHpZYw7ATpBzl8=; b= MebRC2V+KJOFcIjSTXr7TFEGIPK33PrHKnwRgepqfxF6AE7ilaTOxcolaXAP0FQl va3h9ExolhG2ZUVQUVJJvH+ZUArWiq42n5QXwSAPIrbmDBFXUXTDmPFSlxJ9uove 2qLXyVbHrcKsj1Sh5Ogj4TE7gTA2MAf/LcEnlYNvjC8= Original-Received: from localhost.linkov.net (m91-129-101-104.cust.tele2.ee [91.129.101.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTPSA id C80C47FD03; Wed, 5 Sep 2018 15:22:56 -0700 (PDT) In-Reply-To: <5B8F8A0C.1030908@gmx.at> (martin rudalics's message of "Wed, 05 Sep 2018 09:47:24 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150062 Archived-At: >> window-size-change-functions needs to notify the buffer >> that requested such notifications via this hook. > > This is a legitimate request but I'm not sure whether we should do > that for two reasons: > > The first reason is that we already run a buffer-local part of > 'window-configuration-change-hook' Aha, I didn't know that window-configuration-change-hook already supports this useful feature! > Selecting a window and making its buffer current for the sake of > running a hook is a bad idea IMO because both, selected window and > current buffer, are vital informations and a function run by a hook > should be aware of them. Worse even, we already make the selected > window's buffer current first which might defeat the expectations of > a function run by the global hook. > Also the window in question might not have changed at all. The thing > that did change is the window configuration of a frame and it would be > much more interesting if the hook told me what really has changed > instead of telling me that a buffer's window might have changed. > > The second reason is a purely technical one: We'd have to walk the > window tree to find out which buffer may have been affected. However, > the function run by the local hook would still have to find out which > window(s) shouwing the buffer was (were) potentially affected. This > means that the buffer-local function would have to walk the window > tree a second time anyway. It seems what you describe is inefficiency of the current implementation, but currently I have nothing to say about it, sorry. What I see is that the same logic needs to be applied to both window-configuration-change-hook and window-size-change-functions. All the doubts that you raised above can be solved only when these hooks will get more usage, and you will get more reports asking for improvements. This is one of such reports, thanks for your help!