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: Thu, 27 Dec 2018 22:58:04 +0200 Organization: LINKOV.NET Message-ID: <87a7kq4rhf.fsf@mail.linkov.net> References: <87pnxmyjgt.fsf@mail.linkov.net> <87r2e3j1mp.fsf@mail.linkov.net> <83lg4b6kdv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545945803 22542 195.159.176.226 (27 Dec 2018 21:23:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 21:23:23 +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: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 27 22:23:19 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 1gcd7d-0005js-Ig for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 22:23:17 +0100 Original-Received: from localhost ([127.0.0.1]:55313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcd9k-0000Ht-6J for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Dec 2018 16:25:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcd9P-00005P-Cn for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcd9M-0000Bu-88 for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:25:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44903) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcd9M-0000BV-2j for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:25:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gcd9K-0005gf-8O for bug-gnu-emacs@gnu.org; Thu, 27 Dec 2018 16:25:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Dec 2018 21:25: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.154594586421772 (code B ref 32672); Thu, 27 Dec 2018 21:25:02 +0000 Original-Received: (at 32672) by debbugs.gnu.org; 27 Dec 2018 21:24:24 +0000 Original-Received: from localhost ([127.0.0.1]:39577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcd8i-0005f6-Di for submit@debbugs.gnu.org; Thu, 27 Dec 2018 16:24:24 -0500 Original-Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:15460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcd8h-0005ey-7a for 32672@debbugs.gnu.org; Thu, 27 Dec 2018 16:24:23 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0CFF3682B5C; Thu, 27 Dec 2018 21:24:22 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id BF50F6833F5; Thu, 27 Dec 2018 21:24:21 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 27 Dec 2018 21:24:22 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Harmony-Cooing: 786d2c2a23d62696_1545945861912_2433173429 X-MC-Loop-Signature: 1545945861912:557326109 X-MC-Ingress-Time: 1545945861911 Original-Received: from pdx1-sub0-mail-a68.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTP id 55E597FD0D; Thu, 27 Dec 2018 13:24:21 -0800 (PST) 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=TOSF3VSzeKLfZCvu9m9LRZ3Ma7E=; b= nIboggNQezEbL5XDn+ft3VMjpC3B4fgtHSh/OTNEV+8m8D/jJeBD2i4Spxzm/0tr YB+WzOsUUj8cizq29JSiOMdIY69R+D4Adl5ieWsDgwIjCQLFnzPrJH9wGrJbCpSu 57KWu+yEpLu52/i733A8Gin3/HaCT3Jej0iHcMJ+uYw= Original-Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193]) (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-a68.g.dreamhost.com (Postfix) with ESMTPSA id 1139E7FD0C; Thu, 27 Dec 2018 13:24:19 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a68 In-Reply-To: <83lg4b6kdv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 27 Dec 2018 17:48:28 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrtdefgdekkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrudelfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrdduleefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghlihiisehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgepud 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:153929 Archived-At: >> +(defun image-window-change (window) >> + (when (and (eq window (selected-window)) (derived-mode-p 'image-mode)) >> + (let ((spec (image-get-display-property))) >> + (when (eq (car-safe spec) 'image) >> + (let* ((image-width (plist-get (cdr spec) :max-width)) >> + (image-height (plist-get (cdr spec) :max-height)) >> + (window-edges (window-inside-pixel-edges window)) >> + (window-width (- (nth 2 window-edges) (nth 0 window-edges))) >> + (window-height (- (nth 3 window-edges) (nth 1 window-edges)))) >> + (when (or (not (= image-width window-width)) >> + (not (= image-height window-height))) >> + (image-toggle-display-image))))))) > > What happens in Emacs that was not built with Imagemagick? Should we > perhaps do nothing in this hook in that case? Let's hope that native image scaling will handle this properly.