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#32672: 27.0.50; image resize on window resizing Date: Tue, 25 Sep 2018 22:24:16 +0300 Organization: LINKOV.NET Message-ID: <871s9hjvgn.fsf@mail.linkov.net> References: <87pnxmyjgt.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> <87a7o6ewxw.fsf@mail.linkov.net> <5BA9E378.9090105@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537904179 18697 195.159.176.226 (25 Sep 2018 19:36:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 19:36:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32672@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 21:36:15 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 1g4t7z-0004gO-Mc for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 21:36:11 +0200 Original-Received: from localhost ([::1]:54968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4tA6-0007fz-7m for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 15:38:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4t9u-0007fg-U6 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4t9p-0006Oj-SX for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4t9n-0006MX-By for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4t9n-0000s2-8y for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Sep 2018 19:38:03 +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.15379042273214 (code B ref 32672); Tue, 25 Sep 2018 19:38:03 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 25 Sep 2018 19:37:07 +0000 Original-Received: from localhost ([127.0.0.1]:54030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t8s-0000pm-Rl for submit@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:07 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:36602 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t8q-0000pd-U5 for 32672@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:05 -0400 Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id F356C7F6F6; Tue, 25 Sep 2018 12:37:03 -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=V/3Kr/dcCFpQvCu0xGawezMRWkI=; b= atf2fCbE/FGmpo4fIoIqoFwJWB9UTGsLhwMexSCN09Sks3rg35bFrspeCih2O4PJ G0KNHAHuIuqLsf0IP26tHgxiUnv3H8xIXz7H8j74h3IAqTY3I4ypJ37C+tUCUDle X+/SB1VhwBy0KzmLyUEpZGTaAhaEXvqtXBLP2cbHL4g= Original-Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (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-a31.g.dreamhost.com (Postfix) with ESMTPSA id C3B757F37D; Tue, 25 Sep 2018 12:37:02 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 In-Reply-To: <5BA9E378.9090105@gmx.at> (martin rudalics's message of "Tue, 25 Sep 2018 09:27:52 +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:150658 Archived-At: >> I think window hook calls should be consistent at least with own inner logic, >> e.g. as the semantics of the window-size-change-functions hook name suggests >> it should be called when the window size is not the same as was before, >> window-configuration-change-hook is called when the result of window-state-get >> is not the same as it was before, etc. > > Tying 'window-configuration-change-hook' to 'window-state-get' would > be considerably more than we do now or what I'd propose. We probably > shouldn't care about a specific window's scroll bars or margins there. Your proposed window-state-change-functions would match window-state-get very well, e.g. it could call the hook with an argument containing alist of values that really changed, where elements of the alist could have the same keys as in alist returned from window-state-get, for example: (add-hook 'window-state-change-functions (lambda (window alist) ...) nil t) where 'alist' could have such keys and values of changes: (buffer "*scratch*") - means the buffer was switched in the window (selected) - the window was selected (start . #) - the same meaning as for window-scroll-functions (pixel-width . 672) (pixel-height . 557) - the same meaning as for window-size-change-functions maybe also include (pixel-width-before-size-change . 672) (pixel-height-before-size-change . 557) with the same meaning as window-pixel-width-before-size-change and window-pixel-height-before-size-change or with shorter names (prev-pixel-width . 672) (prev-pixel-height . 557) then it makes sense to add also (prev-buffer "*scratch*") (prev-start . #) Or maybe simpler to call the hook with two arguments containing the whole state data structures: (add-hook 'window-state-change-functions (lambda (window prev-state next-state) ...)) but then it's difficult for its consumer to find the differences.