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#24393: 25.1.50; image-mode ignore the image :scale Date: Fri, 09 Sep 2016 11:06:19 +0300 Message-ID: <83a8fh8pl0.fsf@gnu.org> References: <83pooe8g90.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473408995 1047 195.159.176.226 (9 Sep 2016 08:16:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Sep 2016 08:16:35 +0000 (UTC) Cc: 24393@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 10:16:30 2016 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 1biGz4-0007ln-3R for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 10:16:26 +0200 Original-Received: from localhost ([::1]:56514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biGz2-0000og-0B for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 04:16:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biGq3-000320-Jo for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 04:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biGpy-0002Mm-FH for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 04:07:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biGpy-0002Mf-BN for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 04:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1biGpx-0000fG-Rr for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 04:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2016 08:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24393 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24393-submit@debbugs.gnu.org id=B24393.14734084012519 (code B ref 24393); Fri, 09 Sep 2016 08:07:01 +0000 Original-Received: (at 24393) by debbugs.gnu.org; 9 Sep 2016 08:06:41 +0000 Original-Received: from localhost ([127.0.0.1]:54168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biGpc-0000eZ-UX for submit@debbugs.gnu.org; Fri, 09 Sep 2016 04:06:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biGpb-0000eL-Dh for 24393@debbugs.gnu.org; Fri, 09 Sep 2016 04:06:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biGpS-0002CJ-6L for 24393@debbugs.gnu.org; Fri, 09 Sep 2016 04:06:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biGpS-0002Bk-2a; Fri, 09 Sep 2016 04:06:30 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4625 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1biGpP-00068X-CW; Fri, 09 Sep 2016 04:06:28 -0400 In-reply-to: (message from Tino Calancha on Fri, 9 Sep 2016 03:13:36 +0900 (JST)) 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: 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:123104 Archived-At: > From: Tino Calancha > Date: Fri, 9 Sep 2016 03:13:36 +0900 (JST) > cc: Tino Calancha , 24393@debbugs.gnu.org > > >> emacs -Q IMAGE ; IMAGE is the file name of an image file > >> M-x: image-transform-fit-to-width > >> ;; assertion fails. The image width is bigger than the window width. > >> > >> This happens after commit: ad1951db > > > > Please show a backtrace from the assertion violation. > Debugger entered: ((cl-assertion-failed (= (car size) (- (nth 2 (window-inside-pixel-edges)) (nth 0 (window-inside-pixel-edges)))) nil 4299 2514)) > cl--assertion-failed((= (car size) (- (nth 2 (window-inside-pixel-edges)) (nth 0 (window-inside-pixel-edges)))) nil (4299 2514) nil) > image-transform-check-size() > image-toggle-display-image() > image-transform-fit-to-width() > eval((image-transform-fit-to-width) nil) > eval-expression((image-transform-fit-to-width) nil) > funcall-interactively(eval-expression (image-transform-fit-to-width) > nil) > call-interactively(eval-expression nil nil) > command-execute(eval-expression) Isn't there something wrong with the logic from the following fragment of image-toggle-display-image? The comment certainly seems to have it backwards, or at least in contradiction to what image-transform-fit-to-width expects. ;; If we have a `fit-width' or a `fit-height', don't limit ;; the size of the image to the window size. (edges (and (null image-transform-resize) (window-inside-pixel-edges (get-buffer-window (current-buffer))))) I think 'edges' should be non-nil if image-transform-resize is non-nil, no?