[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-
From: |
Eli Zaretskii |
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 |
> From: Ihor Radchenko <yantar92@posteo.net>
> 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.
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/08
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property,
Eli Zaretskii <=
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/08
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Eli Zaretskii, 2023/03/08
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/08
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Eli Zaretskii, 2023/03/09
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/09
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Eli Zaretskii, 2023/03/09
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/09
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Eli Zaretskii, 2023/03/09
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Ihor Radchenko, 2023/03/11
- bug#62048: 30.0.50; Non-nil `line-spacing' takes precendence over 'line-height t text property, Eli Zaretskii, 2023/03/11