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#32672: 27.0.50; image resize on window resizing Date: Tue, 25 Sep 2018 12:19:09 +0300 Message-ID: <837eja9boy.fsf@gnu.org> References: <87pnxmyjgt.fsf@mail.linkov.net> <87ftyfoakb.fsf@mail.linkov.net> <5B98B33D.7000605@gmx.at> <871s9ycnjl.fsf@mail.linkov.net> <5B9A15DA.5000403@gmx.at> <87efdxnfww.fsf@mail.linkov.net> <5B9B7253.5060808@gmx.at> <87pnxexr2m.fsf@mail.linkov.net> <5B9E1E0E.7070805@gmx.at> <87h8ip2eby.fsf@mail.linkov.net> <5B9F4DBD.5020009@gmx.at> <877ejjzr9s.fsf@mail.linkov.net> <5BA20763.8070305@gmx.at> <875zz1t6y1.fsf@mail.linkov.net> <5BA34D7E.4030509@gmx.at> <87fty3sp6a.fsf@mail.linkov.net> <5BA490E5.5090506@gmx.at> <87zhw9xjpx.fsf@mail.linkov.net> <5BA74E3D.5030903@gmx.at> <87va6wt79n.fsf@mail.linkov.net> <5BA89ED5.4050207@gmx.at> <83in2vb8dw.fsf@gnu.org> <5BA8D7AB.5030106@gmx.at> <83d0t3awqt.fsf@gnu.org> <5BA920C4.1060204@gmx.at> <83r2hiaikc.fsf@gnu.org> <5BA9E337.5000806@gmx.at> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537867089 17483 195.159.176.226 (25 Sep 2018 09:18:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 09:18:09 +0000 (UTC) Cc: 32672@debbugs.gnu.org, juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 11:18:05 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 1g4jTo-0004Q3-Fy for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 11:18:04 +0200 Original-Received: from localhost ([::1]:51825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4jVu-0006cf-C9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 05:20:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4jVm-0006cX-Oo for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 05:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4jVi-00062y-P2 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 05:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4jVi-00062m-Jg for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 05:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4jVi-00081e-CT for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 05:20: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: Tue, 25 Sep 2018 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32672 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32672-submit@debbugs.gnu.org id=B32672.153786717030795 (code B ref 32672); Tue, 25 Sep 2018 09:20:02 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 25 Sep 2018 09:19:30 +0000 Original-Received: from localhost ([127.0.0.1]:52860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4jVC-00080d-8f for submit@debbugs.gnu.org; Tue, 25 Sep 2018 05:19:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4jVA-00080P-4S for 32672@debbugs.gnu.org; Tue, 25 Sep 2018 05:19:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4jV0-0005ra-4F for 32672@debbugs.gnu.org; Tue, 25 Sep 2018 05:19:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4jUy-0005rK-Kr; Tue, 25 Sep 2018 05:19:18 -0400 Original-Received: from [176.228.60.248] (port=2092 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g4jUx-0004uo-2J; Tue, 25 Sep 2018 05:19:16 -0400 In-reply-to: <5BA9E337.5000806@gmx.at> (message from martin rudalics on Tue, 25 Sep 2018 09:26:47 +0200) 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:150643 Archived-At: > Date: Tue, 25 Sep 2018 09:26:47 +0200 > From: martin rudalics > CC: juri@linkov.net, 32672@debbugs.gnu.org > > >> As I said, redisplay would not have to care about that at all. It > >> would simply call 'window-state-change-functions' where it calls > >> 'window-size-change-functions' now. And running > >> 'window-state-change-functions' would use one boolean set (among > >> others) instead of where 'run-window-configuration-change-hook' gets > >> called now and which it resets. Iff that boolean was set, it would > >> start to find all windows where a relevant change occurred and run the > >> functions. Buffer-locally iff a window shows the buffer for which the > >> local hook was set and something changed for that window. > > > > Those functions will need to keep track of the changes, or record the > > previous state attributes somewhere, to do their job, right? Are you > > saying that these are already recorded/tracked? If not, they will > > need to be added, which was the point I was making. > > I'm not sure what you mean with "Those functions". I mean window-state-change-functions, what else? > Running 'window-size-change-functions' already records the current > sizes in preparation for the call during next redisplay. > 'window-state-change-functions' would do the same for the values it > manages. We are talking about hypothetical function(s), so it may well be that there's some misunderstanding. My point is that accurate recording of window-size changes is hard, because the various variables used for that might be outdated (e.g., due top a redisplay cycle that didn't complete). Also, redisplay_internal, which calls those functions, will sometimes call them more than once in a redisplay cycle (see the 'retry' label and code that jumps back to it). Bottom line is what I said up-thread: Lisp programs cannot expect those hook calls to be too accurate and focused, they need to be prepared to handle many irrelevant calls, and they had better have their own bookkeeping regarding window dimensions etc. > > Even the "once" part might be problematic, because redisplay_internal > > sometimes re-runs its code more than once, as you know. The "really > > changed since last redisplay" is even trickier, because a given > > redisplay cycle doesn't always finish all of its job, it can stop in > > the middle and return after doing only part of what needs to be done, > > in which case some of the windows are not updated, and we will have > > lost our point of reference. > > What you mention here would affect 'window-size-change-functions' > already now. I see no great harm in that. Neither do I; my point, once again, is that expectations should be quite low.