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: Sun, 09 Sep 2018 19:17:27 +0300 Organization: LINKOV.NET Message-ID: <875zzewsq1.fsf@mail.linkov.net> 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> <5B94DC81.7090104@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536509886 22804 195.159.176.226 (9 Sep 2018 16:18:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2018 16:18:06 +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 Sun Sep 09 18:18:02 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 1fz2PR-0005nO-AU for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2018 18:18:01 +0200 Original-Received: from localhost ([::1]:48000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz2RX-0000ZA-M3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2018 12:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz2RS-0000Z4-FE for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 12:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fz2RN-0003zj-Rl for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 12:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46440) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fz2RN-0003zZ-Nf for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 12:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fz2RN-00077W-Ix for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2018 12:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2018 16:20: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.153650994927295 (code B ref 32637); Sun, 09 Sep 2018 16:20:01 +0000 Original-Received: (at 32637) by debbugs.gnu.org; 9 Sep 2018 16:19:09 +0000 Original-Received: from localhost ([127.0.0.1]:51458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2QX-00076B-Ga for submit@debbugs.gnu.org; Sun, 09 Sep 2018 12:19:09 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:37950 helo=pdx1-sub0-mail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fz2QV-000763-Uj for 32637@debbugs.gnu.org; Sun, 09 Sep 2018 12:19:08 -0400 Original-Received: from pdx1-sub0-mail-a38.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a38.g.dreamhost.com (Postfix) with ESMTP id 0EC6C7E505; Sun, 9 Sep 2018 09:19:07 -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=Q7qO0zmeNAPslT+1kSc89INXcl8=; b= oKU3cupEXwMSVaaXPCLjWMvmpCiKbO4wmEHRu9x38vphGAbsvpqHJHwpIAOS1NlG +46wB3ZU/MmLpLdFP5pg+cYefh6X5zGn9/SgMfTeHyD3BwFsB41kGrNVLlBFdusa TAJA2863MmhtsTriACHsqODlaPTxpyu7z/0b6DntnOg= Original-Received: from localhost.linkov.net (m91-129-104-147.cust.tele2.ee [91.129.104.147]) (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-a38.g.dreamhost.com (Postfix) with ESMTPSA id 5F2527F24E; Sun, 9 Sep 2018 09:19:05 -0700 (PDT) In-Reply-To: <5B94DC81.7090104@gmx.at> (martin rudalics's message of "Sun, 09 Sep 2018 10:40:33 +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:150165 Archived-At: >> 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. > > Agreed. > >> window-size-change-functions calling code could call it only once >> for every frame, even if the same buffer is displayed in multiple >> windows. > > Agreed. > >> I see that it's not called when the buffer is not displayed in any >> window on the frame - this is correct. But what I noted earlier is that >> it's not called when the buffer with the buffer-local hook is not the >> current-buffer in the selected window (but it's displayed in a >> non-selected window on the frame) - this should be fixed to call the hook >> regardless if its window is currently selected or not. > > Agreed. I attach an untested and undocumented patch. Please have a > look. Thank you for the patch. I tried it and it works without problems. I'm testing it on the image window resizing in bug#32672 and it calls window-size-change-functions regardless if the current buffer is in image-mode, or if the image buffer in another window.