Subject: bug#43506: closed (Re: bug#43506: 26.1; line-height sometimes has no effect on the line height)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 11 Feb 2025 07:23:02 +0000

Your bug report

#43506: 26.1; line-height sometimes has no effect on the line height

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
43506: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43506
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#43506: 26.1; line-height sometimes has no effect on the line height
From: Stefan Kangas <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 10 Feb 2025 23:22:47 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> Date: Sat, 19 Sep 2020 14:06:08 +0300
>> From: Eli Zaretskii <[email-masked]>
>> Cc: [email-masked]
>>
>> > From: Markus Triska <[email-masked]>
>> > Cc: [email-masked]
>> > Date: Sat, 19 Sep 2020 12:07:24 +0200
>> >
>> > Eli Zaretskii <[email-masked]> writes:
>> >
>> > >      There are several ways to explicitly specify a larger line height,
>> > >   either by specifying an absolute height for the display line, or by
>> > >   specifying vertical space.  However, no matter what you specify, the
>> > >   actual line height can never be less than the default.
>> >
>> > I find that this is not the case: For example, if I change "3" to "t" in
>> > the snippet I posted, then I get "0" in the minibuffer, indicating that
>> > the line height can become as low as 0 by using this property.
>>
>> The value t is not a valid value for the line-height property.  So you
>> are invoking "unspecified behavior" here by using it.
>
> Sorry, my bad.  The value of t _is_ valid, as documented in the ELisp
> manual:
>
>      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.
>
> This feature is indeed used in image.el, which see.
>
> So the value of t indeed can cause an empty line to appear to have a
> zero pixel-height, but such an empty line cannot display anything, and
> the cursor on that line will have its normal default height.  The use
> case for using this value is as described above, and does not make
> sense for empty lines.
>
> All other values of this property cannot make the line's height
> smaller, as documented.
>
> The conclusion is as before: an integer value of the 'line-height'
> property cannot make the line's height on display smaller than the
> default height.

No further comments within 4 years.

I'm therefore closing this bug report.

Subject: 26.1; line-height sometimes has no effect on the line height
From: Markus Triska <[email-masked]>
To: [email-masked]
Date: Sat, 19 Sep 2020 09:21:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

To reproduce this issue, please start Emacs with "emacs -Q" and then
evaluate the following form:

    (progn
      (goto-char (point-max))
      (insert "\n")
      (insert (propertize "\n" 'line-height 3))
      (forward-line -1)
      (line-pixel-height))

In my case, the minibuffer then states "17". The expected result is 3,
because documentation states:

       A newline can have a ‘line-height’ text or overlay property that
    controls the total height of the display line ending in that newline.

For comparison, it works exactly as expected if I change "3" to "300" in
the snippet above, yielding "300" in the minibuffer.

If possible, could you please make line-height control the total height
of the display line also in the original example, or alternatively
consider changing the documentation to mention all relevant exceptions?

Thank you and all the best!
Markus

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2018-09-22 built on mt-laptop
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000