GNU bug report logs -
#77384
31.0.50; Image slice is ignored on mode/header/tab line
Previous Next
Reported by: David Ponce <da_vid <at> orange.fr>
Date: Sun, 30 Mar 2025 14:02:01 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 77384 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 30 Mar 2025 16:01:14 +0200
> From: David Ponce via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Following is a short recipe to eval in the *scratch-buffer*, that exhibits
> the issue. The expected sliced image is inserted in the current buffer,
> but the whole image is displayed in the header line.
>
> (let* ((img (find-image '((:file "splash.svg"))))
> (size (image-size img t))
> (h (frame-char-height))
> (y (- (cdr size) h h h))
> (txt (propertize " " 'display (list img `(slice 0 ,y 0.5 ,h)))))
> (insert txt "\n")
> (setq header-line-format txt))
You need to do it the other way around:
(let* ((img (find-image '((:file "splash.svg"))))
(size (image-size img t))
(h (frame-char-height))
(y (- (cdr size) h h h))
(txt (propertize " " 'display (list `(slice 0 ,y 0.5 ,h) img))))
(insert txt "\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(setq header-line-format txt))
IOW, first slice, then the image spec.
This bug report was last modified 50 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.