From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32637: 27.0.50; window-size-change-functions not run from local hook Date: Sun, 09 Sep 2018 09:03:20 +0300 Message-ID: <83o9d7qkbb.fsf@gnu.org> References: <87musx9dr1.fsf@mail.linkov.net> <5B8F8A0C.1030908@gmx.at> <87musv1ufw.fsf@mail.linkov.net> <5B90D1B8.1000203@gmx.at> <87tvn2ffgf.fsf@mail.linkov.net> <5B92296A.4020603@gmx.at> <87zhwrzgp8.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536472940 7831 195.159.176.226 (9 Sep 2018 06:02:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2018 06:02:20 +0000 (UTC) Cc: 32637@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 09 08:02:15 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 1fysnW-0001um-PL for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2018 08:02:14 +0200 Original-Received: from localhost ([::1]:46186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyspd-0001fR-7p for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2018 02:04:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyspU-0001fL-OV for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 02:04:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyspJ-0000Nw-4u for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 02:04:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyspG-0000N7-Uy for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 02:04:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fyspF-0006Dt-Mi for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 02:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 06:04:01 +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.153647301023881 (code B ref 32637); Sun, 09 Sep 2018 06:04:01 +0000 Original-Received: (at 32637) by debbugs.gnu.org; 9 Sep 2018 06:03:30 +0000 Original-Received: from localhost ([127.0.0.1]:50786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysok-0006D7-6t for submit@debbugs.gnu.org; Sun, 09 Sep 2018 02:03:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fysoi-0006Cu-Lp for 32637@debbugs.gnu.org; Sun, 09 Sep 2018 02:03:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fysoZ-0008JO-OY for 32637@debbugs.gnu.org; Sun, 09 Sep 2018 02:03:23 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fysoW-0008Fz-DF; Sun, 09 Sep 2018 02:03:18 -0400 Original-Received: from [176.228.60.248] (port=3052 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fysoV-0005wi-TY; Sun, 09 Sep 2018 02:03:16 -0400 In-reply-to: <87zhwrzgp8.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 09 Sep 2018 02:56:35 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:150151 Archived-At: > From: Juri Linkov > Date: Sun, 09 Sep 2018 02:56:35 +0300 > Cc: 32637@debbugs.gnu.org > > > I meant that running 'window-size-change-functions' in a buffer-local > > fashion when no window showing that buffer has changed its size might > > be misleading. > > window-size-change-functions calling code could detect if a window with > a buffer-local hook changed its size, and not to call its hook in this > case. This would be even better than using global hook where you can't > implement such optimization. This might be very hard to implement, given how these hooks are called today. In fact, it might be impossible to implement without changing the strategy of running this hook, and that could very well change the semantics of the hook, and break some existing packages that use them. > > But put a buffer-local function on 'window-configuration-change-hook' > > and show the buffer in two windows. The function gets called twice > > with the respective window selected. So if we implemented > > 'window-size-change-functions' in the same way as you suggested > > earlier, you would "find all Man windows on the frame to compare their > > sizes and reformat the buffer with the minimim width from all its > > windows" twice. How would you deal with that? > > window-size-change-functions calling code could call it only once > for every frame, even if the same buffer is displayed in multiple > windows. AFAIK, window-size-change-functions is already called once per frame, so I'm not sure what you are saying here.