From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38187: 27.0.50; No mouse-wheel scaling on images Date: Fri, 22 Nov 2019 15:26:42 +0200 Message-ID: <8336egvy7h.fsf@gnu.org> References: <87a78u7ags.fsf@gnus.org> <878soemc79.fsf@marxist.se> <87mucut8ch.fsf@mail.linkov.net> <87ftilsg6q.fsf@gnus.org> <87r224sw6s.fsf@mail.linkov.net> <83ftik35kw.fsf@gnu.org> <87pnhmm9ui.fsf@mail.linkov.net> <87blt4x6nt.fsf@gnus.org> <20191122095008.GA96578@breton.holly.idiocy.org> <83a78ow7jy.fsf@gnu.org> <20191122103300.GA4888@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227730"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org, stefan@marxist.se, 38187@debbugs.gnu.org, juri@linkov.net To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 22 14:33:30 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iY93x-000x53-1x for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Nov 2019 14:33:29 +0100 Original-Received: from localhost ([::1]:50804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iY93v-0000u3-CN for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Nov 2019 08:33:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54333) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iY93i-0000g7-Uc for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 08:33:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iY8xk-0007oL-Bf for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 08:27:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iY8xk-0007oC-87 for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 08:27:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iY8xj-0005be-VE for bug-gnu-emacs@gnu.org; Fri, 22 Nov 2019 08:27:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Nov 2019 13:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38187 X-GNU-PR-Package: emacs Original-Received: via spool by 38187-submit@debbugs.gnu.org id=B38187.157442920121513 (code B ref 38187); Fri, 22 Nov 2019 13:27:03 +0000 Original-Received: (at 38187) by debbugs.gnu.org; 22 Nov 2019 13:26:41 +0000 Original-Received: from localhost ([127.0.0.1]:53945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY8xI-0005ai-2Z for submit@debbugs.gnu.org; Fri, 22 Nov 2019 08:26:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY8xF-0005aV-Tl for 38187@debbugs.gnu.org; Fri, 22 Nov 2019 08:26:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iY8x9-0007bb-V5; Fri, 22 Nov 2019 08:26:27 -0500 Original-Received: from [176.228.60.248] (port=4584 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iY8x8-0002j3-Uh; Fri, 22 Nov 2019 08:26:27 -0500 In-reply-to: <20191122103300.GA4888@breton.holly.idiocy.org> (message from Alan Third on Fri, 22 Nov 2019 10:33:00 +0000) 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: 209.51.188.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:172234 Archived-At: > Date: Fri, 22 Nov 2019 10:33:00 +0000 > From: Alan Third > Cc: larsi@gnus.org, 38187@debbugs.gnu.org, stefan@marxist.se, > juri@linkov.net > > > > A simple ‘solution’ to the mousewheel scaling issue would be to > > > explicitly flush the old image from the cache on each change. I think > > > that’s what image mode does when you zoom. > > > > image-mode can do that when it knows the scaled image will replace the > > previous one, yes. (We will need to add an API for that, I think.) > > But that's not cache eviction, that's application being smarter about > > the "garbage" it produces. > > Actually, now I look at the code, when an image is resized using the > mousewheel the previous image should already be flushed. > > In image.el we have this function: > > (defun image--get-imagemagick-and-warn () > (unless (or (fboundp 'imagemagick-types) (image-transforms-p)) > (error "Cannot rescale images on this terminal")) > (let ((image (image--get-image))) > (image-flush image) ;;; <<--------------- > (when (and (fboundp 'imagemagick-types) > (not (image-transforms-p))) > (plist-put (cdr image) :type 'imagemagick)) > image)) > > which is called every time an image is resized. So perhaps I > misunderstand what image-flush does, or we do have a memory leak? Strange indeed. I suggest to step in a debugger through this and other relevant code in this scenario, and see what happens there. I'd be surprised to know that we have a memory leak in this area.