From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#24393: 25.1.50; image-mode ignore the image :scale Date: Fri, 9 Sep 2016 19:23:02 +0900 (JST) Message-ID: References: <83pooe8g90.fsf@gnu.org> <83a8fh8pl0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1473416664 2710 195.159.176.226 (9 Sep 2016 10:24:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Sep 2016 10:24:24 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 24393@debbugs.gnu.org, Tino Calancha To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 12:24:19 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 1biIyl-00082F-AQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 12:24:15 +0200 Original-Received: from localhost ([::1]:57011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biIyj-00004t-DC for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 06:24:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biIyd-0008WT-Cq for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 06:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biIyY-0003l4-AP for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 06:24:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biIyY-0003kw-7o for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 06:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1biIyX-00046l-Sz for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 06:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2016 10:24: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.147341659415729 (code B ref 24393); Fri, 09 Sep 2016 10:24:01 +0000 Original-Received: (at 24393) by debbugs.gnu.org; 9 Sep 2016 10:23:14 +0000 Original-Received: from localhost ([127.0.0.1]:54214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biIxm-00045b-4k for submit@debbugs.gnu.org; Fri, 09 Sep 2016 06:23:14 -0400 Original-Received: from mail-pa0-f54.google.com ([209.85.220.54]:33761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biIxj-00045N-Uw for 24393@debbugs.gnu.org; Fri, 09 Sep 2016 06:23:12 -0400 Original-Received: by mail-pa0-f54.google.com with SMTP id cm16so27249595pac.0 for <24393@debbugs.gnu.org>; Fri, 09 Sep 2016 03:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=PgEYoFwhnRs0cTBPEtfHuJ9ttJNNV7lL1c0MfXEk4z8=; b=ix2PR+aUl01jTI7eDSCI87i5wHwEzmy510x8yfBudRXSYtTWk4u5b2G7aHzAIApIpK 0oHHV+c7Ydohacd6RVUyx16oMZh8X2a9qKcZgVn019zSrnWxtChkfDGJarOoPFtT2noN 63gBEXXW5Q5gVG0jJwofhF92BUSgmvKlZQBtMfLVDneFyuFX/zJRb2BkiPH2z6KTPTcg iS1v50hnZePI+dhIgJfZXCqptD9EV8rvqcDJnaZ40EO6qaUdgmNYYuThMNbzSBoAp4he pdsjGHKbx2kIhf+ginmx535c3UOSTwm0jxOGx2kjbWvOHIpXJ9DJbracHxfUNuwjS95q QJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=PgEYoFwhnRs0cTBPEtfHuJ9ttJNNV7lL1c0MfXEk4z8=; b=ZJIVS4i0npQCtUPUEKPe034wdfo2/VzA3d5XUkS3HTdn2BBkoGwfT5+YcOOEt5fpq/ JvDapqh+HKCBs+HPJZzlF3S7hhiNrx3ZbOM7oU/8JMj8L1hw3EBdsTHhlFr2Xpw3KYZT O0UtIR7D0OEf7tyMSNjk172KOPjomUXmnnWYOKnKfvF/UxQzO7sdKMh5tDXhNv7snIcS asH+KN72XWJGAztXTLYyzFlzENwDFelaBBK+lSmftoPwUApBjXpe+7Z2HBHuXQuRB4lL 4QBsLw1WdafB6JuJb8PirOHc3daPlEYsNKek4WQsm4Rpp5q89kUBwEgAg57/gJLf/UAo 8cxw== X-Gm-Message-State: AE9vXwNClGbqaSxYnqeP7YB4SR0ZA8eWknnjhHTSizTlYNQBMCc7CsVcx5eaPJwnu6eZ+w== X-Received: by 10.66.76.106 with SMTP id j10mr5123756paw.65.1473416586135; Fri, 09 Sep 2016 03:23:06 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id tj5sm4132205pab.37.2016.09.09.03.23.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 03:23:05 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <83a8fh8pl0.fsf@gnu.org> 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:123107 Archived-At: On Fri, 9 Sep 2016, Eli Zaretskii wrote: > 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? I think is OK. Maybe i would adjust the comment a bit, because `image-transform-resize' can also be a number (set by `image-transform-set-scale'): i would say: ;; If `image-transform-resize' is non-nil, don't limit ;; the size of the image to the window size. I think the logic is as follows: The proportion width/height is an invariant of this transformation. If you call `image-transform-fit-to-width', your image width will occupy all the window width. Then, the height is increased in the same proportion as the width, so the final image height may be longer than the window height. That's OK.