From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#32637: 27.0.50; window-size-change-functions not run from local hook Date: Fri, 07 Sep 2018 09:31:54 +0200 Message-ID: <5B92296A.4020603@gmx.at> References: <87musx9dr1.fsf@mail.linkov.net> <5B8F8A0C.1030908@gmx.at> <87musv1ufw.fsf@mail.linkov.net> <5B90D1B8.1000203@gmx.at> <87tvn2ffgf.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1536306037 23099 195.159.176.226 (7 Sep 2018 07:40:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2018 07:40:37 +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 Fri Sep 07 09:40:33 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 1fyBNY-0005xL-To for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Sep 2018 09:40:33 +0200 Original-Received: from localhost ([::1]:37173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyBPf-0001QU-4x for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Sep 2018 03:42:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyBGM-0000vK-AD for bug-gnu-emacs@gnu.org; Fri, 07 Sep 2018 03:33:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyBGJ-0005oR-3h for bug-gnu-emacs@gnu.org; Fri, 07 Sep 2018 03:33:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyBGI-0005nK-Ur for bug-gnu-emacs@gnu.org; Fri, 07 Sep 2018 03:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fyBGI-0001Uu-LB for bug-gnu-emacs@gnu.org; Fri, 07 Sep 2018 03:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Sep 2018 07:33:02 +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.15363055345701 (code B ref 32637); Fri, 07 Sep 2018 07:33:02 +0000 Original-Received: (at 32637) by debbugs.gnu.org; 7 Sep 2018 07:32:14 +0000 Original-Received: from localhost ([127.0.0.1]:48716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyBFW-0001Tr-H7 for submit@debbugs.gnu.org; Fri, 07 Sep 2018 03:32:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:45099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyBFU-0001Td-7f for 32637@debbugs.gnu.org; Fri, 07 Sep 2018 03:32:12 -0400 Original-Received: from [192.168.1.101] ([212.95.5.234]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MFtf4-1g37Rq1up4-00EwpF; Fri, 07 Sep 2018 09:32:04 +0200 In-Reply-To: <87tvn2ffgf.fsf@mail.linkov.net> X-Provags-ID: V03:K1:iWZx7lGwDYeomgIWGd7HyFxUkD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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:150110 Archived-At: > But in bug#32536 you agreed that Man-window-size-change has to > take care of cases where buffer-local window-size-change-functions > needs to find all Man windows on the frame to compare their sizes > and reformat the buffer with the minimim width from all its windows. > > So the window-size-change-functions hook should call the function not > with the window as argument, but with the whole frame, as it already > does now. And to call the buffer-local hook only once for all > affected windows, as it already does now (the hook has responsibility > to find all its windows from the frame). 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. 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? >> And I still think that running 'window-configuration-change-hook' >> buffer-locally in its current from hardly makes sense either: For >> example, we don't call it for a buffer when that buffer has been >> removed from a window which incidentally is the case that would allow >> Man to remove its function from 'window-configuration-change-hook'. > > There is no need to remove function from the buffer-local hook, > because it is called only when the buffer is displayed > in a window. As you noted earlier, a buffer-local 'window-size-change-functions' function gets called regardless of whether the buffer is shown in a window on the frame in question. So I suppose that's a function you wanted to remove at least as long as we do not change the present code. And if we wanted to fix that, we probably need something better than imitating 'window-configuration-change-hook'. martin