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: Sun, 23 Sep 2018 10:26:37 +0200 Message-ID: <5BA74E3D.5030903@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> 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 1537691648 25613 195.159.176.226 (23 Sep 2018 08:34:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2018 08:34:08 +0000 (UTC) Cc: 32672@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 23 10:34:03 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 1g3zq7-0006Ye-DZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Sep 2018 10:34:03 +0200 Original-Received: from localhost ([::1]:39804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3zsD-0006ac-VD for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Sep 2018 04:36:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3zrp-0006Nq-62 for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2018 04:35:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3zjK-0003ic-QP for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2018 04:27:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g3zjK-0003iY-LC for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2018 04:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g3zjK-0000aF-HD for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2018 04:27: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: Sun, 23 Sep 2018 08:27: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.15376912152222 (code B ref 32672); Sun, 23 Sep 2018 08:27:02 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 23 Sep 2018 08:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:50279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zjC-0000Zm-OI for submit@debbugs.gnu.org; Sun, 23 Sep 2018 04:26:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:45401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3zjA-0000ZZ-KP for 32672@debbugs.gnu.org; Sun, 23 Sep 2018 04:26:53 -0400 Original-Received: from [192.168.1.101] ([212.95.5.115]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LtJAR-1ff45w0Yp9-012rcu; Sun, 23 Sep 2018 10:26:43 +0200 In-Reply-To: <87zhw9xjpx.fsf@mail.linkov.net> X-Provags-ID: V03:K1:3qw9A33el2moDwL0TdmdpmH7FjQ6haoRMgHT4pE2+aOBEGT7nSR IFfHAAtl8HyyXSee0C5MtE+5PXaLk0agq6eK3SfjHPaNsl2fXFO+3L9q2tuczEKmFz1VuO0 RVX+/kgeJpz4UMYennDdApJKwxAVRDUh7+LkmHlmN1sbTAQShLfokU5VK3YiL2ArKpv0aY/ EwxghOy6CTucAUuWSCl1w== X-UI-Out-Filterresults: notjunk:1;V01:K0:zAM21dclUGw=:K+uVbgvNXQoFvHkYKfSuGE NpDIdKipLgFcRTgWlGteC2ZWc2cddJ9IXIhRoEcdeNbkzqLwUAirN8Q5O4tuWXkkXN2HWy69F z0y5OFeU3a6Pj4rKl4PkrKRL1ikxWLYcwQqjmZvLJv6DUhR5N93ASPC795lYa9fNOCJ7c981V +m/9kSzAARVjUnA5Q1H9dSHdnHK6Rvx/HIoT0d63SWTXq0Q69k2girwd/QbJnvHinpVSTPKNH gwBeKpwBIeLYZY91zrz0H2c/1LH/hhfav95/1x8KJ7sU0Y8HJ8+77yikO0+FBONrdByXDcKiv qppr0m+TPbguqxr0ZWB3YymOXvN72r2OdZptjMUgyPg2BuGylSUGoZQlP9OdLynPfdKPrFnyw aUsoYGp/+7WjBOKbnmh/bgVlC2yo7Go6P4NwYprV2iirSKAFoSRyTEfWRLYSMIlQhRp542P5x Qa59m9EKB07v9s/Nd46wM0n9BDa+yvMkXhsDRGbOCN3GtEC7zaidxSgNa9NbjJEqvUcGHIABj I202O9gEmKmqITp7i51UqpLp5kGMuyXG7xLevvWkKq7CKPZLdf03A+fd6C25fn76yAsFJT3R1 P66qhMcpOVjXRtAJuSbcmTxb2ykRz6oSO8BoSkHcKs5v+KQxk/BrC82J7x2osdTaoXB8T/d5e BKoZo4UcUmOpsj9U2dD4P7wtg3G4S3lMwslwEmafjA2DTXX9t9MJeEiTMvMmR/9YHn7neOCL/ suzBE8mKZmnjobEYepGVDyk+/QnfV8F9zDXTgvNHEvl/kkAsS9R2Zei3PyreD8qZYeLa6FOa 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:150568 Archived-At: >> Shouldn't you debounce the call to 'image-size-buffer-change' as well? >> After all, the buffer list seems to change more often than the size of >> windows. > > When I tried debounce for buffer-list-update-hook, it used the last call > in sequence: > > 1 ... current: *scratch* ... window-buffer: *scratch* > 2 ... current: *scratch* ... window-buffer: *info* > > that was unsuitable for the logic of 'image-size-buffer-change'. I'm afraid that 'buffer-list-update-hook' is too coarse for your purpose - it gets called too often for unrelated events like creating or killing some completely unrelated buffer. If you think that running a hook after selecting a window with NORECORD nil would fit the bill better, let's try it. Many people have asked for such a hook and we always rejected it (Bug#7381, Bug#16436). Maybe it is time to reconsider. > So maybe instead of 'debounce', we need to implement and use 'throttle' > or at least implement the 'immediate' option that uses the first call: > > https://css-tricks.com/debouncing-throttling-explained-examples/ We'd probably need to come up with examples from our code base in order to decide what to implement and how. martin