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#32672: 27.0.50; image resize on window resizing Date: Tue, 25 Sep 2018 09:26:47 +0200 Message-ID: <5BA9E337.5000806@gmx.at> 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> 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 1537860381 6355 195.159.176.226 (25 Sep 2018 07:26:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 07:26:21 +0000 (UTC) Cc: 32672@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 09:26:16 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 1g4hjc-0001Yg-4g for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 09:26:16 +0200 Original-Received: from localhost ([::1]:51415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hli-0004lV-Mb for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 03:28:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hlQ-0004dk-DN for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 03:28:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4hlM-0003cn-D1 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 03:28:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4hlK-0003cD-Ph for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 03:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4hlK-0005Bw-Ch for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 03:28: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: Tue, 25 Sep 2018 07:28: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.153786042519862 (code B ref 32672); Tue, 25 Sep 2018 07:28:02 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 25 Sep 2018 07:27:05 +0000 Original-Received: from localhost ([127.0.0.1]:52794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hkP-0005AI-JJ for submit@debbugs.gnu.org; Tue, 25 Sep 2018 03:27:05 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:40771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4hkN-00059k-QM for 32672@debbugs.gnu.org; Tue, 25 Sep 2018 03:27:04 -0400 Original-Received: from [192.168.1.101] ([46.125.249.3]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lg0sd-1fP27a3JV5-00pcrL; Tue, 25 Sep 2018 09:26:53 +0200 In-Reply-To: <83r2hiaikc.fsf@gnu.org> X-Provags-ID: V03:K1:IZHdQ5jwPnAdA57Xm/0W8RNOVgVuW3x3LruNf7DfrL50Hgb9vgS 9smWwTly7LHage6X50ItBCM+3FYTiy6P+pvRk0qecfypm5EwkHDBB7/gQpE82EsJY0yHQLa Lbl3K0rD0jCc+/FNDGcA69yOygDijuppmijg4bTPH6b+FkYN3+DjovU0y1jbNeZMZfZEk3h YmPy4c0KeCWrZ1QRh++Kw== X-UI-Out-Filterresults: notjunk:1;V01:K0:pTwkAkOC0Ao=:0Z9KQmb1ntlP85QIjV1T9O AYju4E8EGZj7jc30yFId8Fm1WAwYsE2SnAsi5PQmlqZt/UlkhQTeT0oxmjenBM7jWrIuuHKVc 9yMfluNzCL4g65A/CxlF4UC9z8NG63QKq0cesBNH94p4Q/ZVvVI5aDEw0UymnT0trpvdslOW9 3CIBy4eQa++Pdxcl6q8fUDO88gwZ7LbXbScU+pFy+1UYHMNRQAvnDgOUP8Bzi94YW5UPZNEtd cIZtgZ2SLtaTNHY1lfXM8jhfRd3xfGVWUlu5pN7qKFzHJtMPCpZ3Dy4WR6hJhX8W36DqipDBO jLkSICSiJDt4I5ZvFmqdzmRBSujukdvDmPcRkgjUcgHBCHeQ+d65bPPBQKntUUm4Uyu5BjLdU OEQwp+CFC6wGhfTKQhz3KiP8d2I9LLMeRt0Wi6SoGMl/syXYlNJ/cW9gCiAV05+uTcQDSwMQh C/SbMiciW79cPJZDEfa3OZNhZI69+FsqGFn4RlIf9j16mN5tQniKe7Gnv85k/sOhp0ymZYU9f uCstrnRLo15tfvzgDTxPD3kD3RYFpDJ7HA+qRZ1fN7/nxcKrcj4bfeK7guRFu1a9NSaTVultw YtZbCU0gkfjY8zGNNQ0pEffo/+G5Dd+bou6LTFGiIsT/OIDVbnT162+XieVQIIVZGNJG/2JW9 1x6EeS0gFUVq4uODrnDmQC0S3YMst6Sa5mYNhTxpxUqyBsnQ2PIRWZJ8zr3i1MlzHJgRw0Eby w9ujWQTAQCGc4sw+oq2gqXf/7cNaHYAao1FFC4O/4bXvBWB4rcu+LV/4fdsKUg2z7CP5R1ZT 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:150637 Archived-At: >> 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". 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. >> The great advantage for users and application programmers would be >> that their functions would run once only and only if something really >> changed since last redisplay. > > 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. If running 'window-size-change-functions' succeeds, callers will have adapted to the new sizes and no further calls are necessary. If it fails, the old sizes will continue to exist and the functions will be called (maybe again) during the next internal redisplay. martin