From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property Date: Wed, 08 Mar 2023 19:31:44 +0200 Message-ID: <83a60n40an.fsf@gnu.org> References: <87ilfbe8r0.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62048@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 08 18:32:35 2023 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 1pZxeU-0004Ns-F3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Mar 2023 18:32:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZxeG-0005SZ-8v; Wed, 08 Mar 2023 12:32:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZxdy-0005RS-PE for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2023 12:32:12 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZxdy-0004qV-1x for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2023 12:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZxdx-0002ZK-TR for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2023 12:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Mar 2023 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62048 X-GNU-PR-Package: emacs Original-Received: via spool by 62048-submit@debbugs.gnu.org id=B62048.16782967179860 (code B ref 62048); Wed, 08 Mar 2023 17:32:01 +0000 Original-Received: (at 62048) by debbugs.gnu.org; 8 Mar 2023 17:31:57 +0000 Original-Received: from localhost ([127.0.0.1]:50114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZxds-0002Yy-Lt for submit@debbugs.gnu.org; Wed, 08 Mar 2023 12:31:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZxdr-0002Ym-28 for 62048@debbugs.gnu.org; Wed, 08 Mar 2023 12:31:55 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZxdk-0004nx-4F; Wed, 08 Mar 2023 12:31:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=qBOHt03mrYwfB5pWcf5OJJoNOv1ebSDgQZq6GnG9Gi4=; b=GCEyWb5Hk72lhcJMT0E5 wf4rs01shoEkMBH21xwTKBax6yIj4Z4NhJGgSXy8NCgPo8I4vr7nH3y6CjwmtKtGrLXr4+YwTGegQ SSxbFDHDLmn7sKUMQJlub0Y5BrfkKmMAbE7E3pNxfQrI7Cqx/fQT9seKjPSnUjFMZX2qHWAmmfVZp y9hONSAJ24POBgaTGDXXrIi7Ow6GqyI6Z3Pv+dpBOr2/7LG1wNc4IqRSZXi9+k8tBb7tJ26YDu1H1 BJDWwLhgilVkS3CJF+YC/OoNDAPJtoG7yKSTQUIMKSLiU2Js8rzUvVfADGaL5hhilyQeL0Mx8YOXP kyRiwaQhIus9LQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZxdh-0004I4-So; Wed, 08 Mar 2023 12:31:46 -0500 In-Reply-To: <87ilfbe8r0.fsf@localhost> (message from Ihor Radchenko on Wed, 08 Mar 2023 12:18:59 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257553 Archived-At: > From: Ihor Radchenko > Date: Wed, 08 Mar 2023 12:18:59 +0000 > > According to 41.11 Line Height section of Elisp manual, > > A newline can have a ‘line-height’ text or overlay property that > controls the total height of the display line ending in that newline. > The property value can be one of several forms: > > ‘t’ > If the property value is ‘t’, the newline character has no effect > on the displayed height of the line—the visible contents alone > determine the height. The ‘line-spacing’ property, described > below, is also ignored in this case. This is useful for tiling > small images (or image slices) without adding blank areas between > the images. > > AFAIU, it implies that buffer-local `line-spacing' value is also > ignored. > > Consider the following minimal example: > > 1. emacs -Q > 2. (setq-default line-spacing 0.15) > 3. (with-silent-modifications (insert-sliced-image (create-image "/path/to/some/image") nil nil 10 nil)) > > Expected: the spliced image is displayed without gaps. > Observed: visible gaps between image rows > > If I understand correctly, `insert-sliced-image' tries to avoid the gaps > by (insert (propertize "\n" 'line-height t)). But it does not seem to be > working. > > Am I missing something? The above text in the manual is misleading: only the line-spacing property of the same newline is ignored in this case. (It makes no sense to ignore the buffer-local value of line-spacing due to a single newline, because the buffer-local value of line-spacing affects all the lines in the buffer, not just one line.) IOW, the line-height property of the newline overrides the 'line-spacing' property of the same newline. I've updated the manual to be more accurate about this. But other than that, this is not a bug in the code.