From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#52929: 27.1; Images are sometimes not fully displayed Date: Sat, 1 Jan 2022 17:01:27 +0100 Message-ID: <83f2f02c-9276-44e8-f15b-70cdf666dcd8@gmx.at> References: <87h7anlq95.fsf@metalevel.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33580"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52929@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 01 17:02:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3gpe-0008cq-DO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 17:02:10 +0100 Original-Received: from localhost ([::1]:56060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3gpd-0001Sj-2w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jan 2022 11:02:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3gpW-0001Sb-Ci for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 11:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3gpW-0005V2-3Z for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 11:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3gpW-0001kN-2A for bug-gnu-emacs@gnu.org; Sat, 01 Jan 2022 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jan 2022 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52929 X-GNU-PR-Package: emacs Original-Received: via spool by 52929-submit@debbugs.gnu.org id=B52929.16410528986682 (code B ref 52929); Sat, 01 Jan 2022 16:02:02 +0000 Original-Received: (at 52929) by debbugs.gnu.org; 1 Jan 2022 16:01:38 +0000 Original-Received: from localhost ([127.0.0.1]:59207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3gp8-0001jh-37 for submit@debbugs.gnu.org; Sat, 01 Jan 2022 11:01:38 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:47391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3gp5-0001jN-Kp for 52929@debbugs.gnu.org; Sat, 01 Jan 2022 11:01:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641052889; bh=H/0qly+Ii9oatHg+4u/AGS+V4sM9y19XCeBgkWTErOI=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=B8sDTw55F7i2b+RIqM8wKiSk+5uaA9u+wqYSaK943YQ3wiU1/+Bs5E2/bXw9hFMIb e5yproKgw16TI91H5H7sloPeDhqnX+F90R8K6n69jFU/uTg9ZOhw0qp2IiWz4coZYL pHvhan8rdLkMQmNNtOGS2fJcNXA1+b84eczs79wM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.102] ([46.125.249.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M2O2Q-1n7X6d11ry-003wJ6; Sat, 01 Jan 2022 17:01:29 +0100 In-Reply-To: <87h7anlq95.fsf@metalevel.at> Content-Language: en-US X-Provags-ID: V03:K1:4BWzP1Kl+qbYCFpz5ELpGsO9VuUTmWjAr+0kZ6bqds7UMZc+HKm wVvbIF/McLxmS0oNiqq286uBmYnFyW0g1Yag4ULLDPc3kt50b1j1rEjhGT9CipLgzlcl7g4 CdUWmRf27hmwevMafgTsjwyTvS1gOI9dKJpNR0LoYPpeNq5yqgBxhpWxyWbNZPzP0BtuAVV TVreu+EQNe0B//0SFPOZA== X-UI-Out-Filterresults: notjunk:1;V03:K0:lON1RIwXkY0=:EHuh33j/pHn3exEolK0Ioj H3C/XZ7S7jYobYRwvCAgVJMU/Vr9VgQum6wBmd/P14qsnJ7PoKNHRQAmaDy0W7k+66JPo8DPF bBRM57jzqollORNCIWayWQyMXEdmWAOy/htMQCWIJLddtGAGOOUSLzKDsZxQhLKnMS+iiQ/D8 8T4eGzjPiFCUexULSUxoc/tYPGqRsn2+ojb/sqaZ+CVpqUv43EHGtvwJRkIJHe6uQBsgrhPf2 2HeyUpEH8T+ARfPyPFkYxSa7RmGt1J137B59Pg7HJCr+N5cALIYgpaMad8LB+Uio+7DDhE1mu h0rcpuc7DzGM+nB5KVNH10Hn7j4vUGQVvC6Q9Xp7bu0UQdS1U85I6S2lkZc+l0WADH9SToZcZ gZg6lOvk3haPoV25Fnh93q1U+rsiusG+V3T6QwUTtxc6q17RTuJSOSDRkBq8EHVq5UWxpX6Xs 00S/XBijN7QrcDDnSDIsNsdZmAjRd9/xHRa5uBoHeaQJmXqkb4o0j6Jq+bLIP2NPLnema+M9V OiP5SEcs8/WqPq515+Bci90ibG3hkOKmzyyLS8UPxvuMeFcEpEugoktsvoZrcATFLjDKoe/JK ZUoYOJfb2jkC7NNn1wqjcNy8pXfcShYyLHJruqfGgwJnJiAqbzSZxgvW2NZTDRgEBbt8CcWqZ EGPpgQQh5+eSwlDOyBUVJsHrxkfo6H4j5xpBphaD5BYTpg4AFfGf6zNcJlDwxja2/tsLH/BhU KHkAy+Dj+apEUkhXwMqn8LWaP6TsqgVacQRIi+GnEz/mKErKUh7FTBL0GvR6ffQbOiSEvTVa X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223504 Archived-At: >> Please try with adding a (no-special-glyphs . t) entry to the parameters >> of the child frame. > > This solves the issue completely, thank you a lot for this! Could you > please briefly explain why this is necessary to fully show the image? In > particular, which glyph was shown here that used the 1 pixel width? When a window has no right fringe, Emacs by default usurps the rightmost character on each text line so it can indicate there whether that line is truncated or continued. The maximum width of the special glyph to be displayed there (typically a "$" or a "\") is subtracted from the maximum width of the display area of that window. So with the right fringe turned off, you as a rule always lose one column to the display engine even when displayed lines are never truncated or continued. But Eli can explain it better. Note that with current master you need not calculate the size of your image yourself. Emacs can do it for you as with (with-current-buffer (get-buffer-create "Happy New Year 2022!") (setq cursor-type nil mode-line-format nil) (erase-buffer) (insert-image-file "/home/martin/Downloads/202202.png") (let* ((size (buffer-text-pixel-size)) (width (car size)) (height (cdr size)) (frame (make-frame `((parent-frame . ,(selected-frame)) (no-special-glyphs . t) (minibuffer . nil) (left . 100) (top . 100) (internal-border-width . 0) (vertical-scroll-bars . nil) (left-fringe . 0) (right-fringe . 0) (width . (text-pixels . ,width)) (height . (text-pixels . ,height)))))) (read-key) (delete-frame frame))) With Emacs 27 you would have to use 'window-text-pixel-size' or 'fit-frame-to-buffer' which both have the problem that you first have to put your buffer into a window in order to resize it appropriately. martin