From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33990: 27.0.50; image-transform-fit-to-height/-width violates assert Date: Sat, 19 Jan 2019 10:29:11 +0200 Message-ID: <83imylaw4o.fsf@gnu.org> References: <875zv3m2xd.fsf@turtle-trading.net> <83a7kf0y6w.fsf@gnu.org> <87lg3yno9e.fsf@turtle-trading.net> <83fttyf6a9.fsf@gnu.org> <87va2p8uu7.fsf@turtle-trading.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1547886486 22981 195.159.176.226 (19 Jan 2019 08:28:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2019 08:28:06 +0000 (UTC) Cc: 33990@debbugs.gnu.org To: Benjamin Riefenstahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 19 09:28:01 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 esmtp (Exim 4.84_2) (envelope-from ) id 1gklyx-0005mF-Ni for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2019 09:27:59 +0100 Original-Received: from localhost ([127.0.0.1]:52939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkm15-0006YV-1C for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2019 03:30:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkm0y-0006WN-Kd for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 03:30:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkm0x-0000gY-Qn for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 03:30:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkm0x-0000gM-N4 for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 03:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gkm0x-0002I8-Im for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 03:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jan 2019 08:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33990 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33990-submit@debbugs.gnu.org id=B33990.15478865848755 (code B ref 33990); Sat, 19 Jan 2019 08:30:03 +0000 Original-Received: (at 33990) by debbugs.gnu.org; 19 Jan 2019 08:29:44 +0000 Original-Received: from localhost ([127.0.0.1]:37286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkm0e-0002H9-88 for submit@debbugs.gnu.org; Sat, 19 Jan 2019 03:29:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkm0d-0002Gv-43 for 33990@debbugs.gnu.org; Sat, 19 Jan 2019 03:29:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkm0V-0008E3-0J; Sat, 19 Jan 2019 03:29:37 -0500 Original-Received: from [176.228.60.248] (port=4837 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gkm0R-0000bb-8H; Sat, 19 Jan 2019 03:29:33 -0500 In-reply-to: <87va2p8uu7.fsf@turtle-trading.net> (message from Benjamin Riefenstahl on Tue, 15 Jan 2019 22:38:40 +0100) 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:154584 Archived-At: > From: Benjamin Riefenstahl > Cc: 33990@debbugs.gnu.org > Date: Tue, 15 Jan 2019 22:38:40 +0100 > > Eli Zaretskii writes: > > Can you propose a patch that would implement your suggestion? > > It looks like my analysis was wrong. The problem is rather that > create-image applies a default scaling, when :scale is not given. This > depends on the font size (only if char-width > 10 pixels), which > explains why it happens on my laptop but not on my desktop machine. I > guess create-image is targeting image resources like toolbar buttons, > where it may be a good idea to scale the images with the fonts for > so-called "hidpi" displays. But for image-mode the situation is > different and I at least do not want that behaviour. > > I attach three patches, the first is a minimal change that fixes the > problem for me. The second adds to the doc string of create-image, > because I think that its behaviour is unexpected enough to warrant > highlighting. The third makes the image-mode transform parameters > buffer-local, because that seems more appropriate and even complies with > the doc string form image-transform-rotation better. This third patch > changes behaviour, though, so maybe a second opinion is in order. > > The patches are against master, I haven't tested if they apply against > emacs-26. Let me know if there is something that needs to be changed. Thanks, this LGTM. I will wait for a few days for comments, and pushd these if no objections are heard. I understand these are not recent regressions? If so, I think the master branch is where they should go. But if you think the bug is grave enough, I could consider them for the emacs-26 branch instead.