GNU bug report logs - #77429
31.0.50; Image map and display slice on mode/header/tab line

Previous Next

Package: emacs;

Reported by: David Ponce <da_vid <at> orange.fr>

Date: Tue, 1 Apr 2025 13:09:02 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 77429 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Ponce <da_vid <at> orange.fr>
Cc: 77429 <at> debbugs.gnu.org
Subject: Re: bug#77429: 31.0.50;
 Image map and display slice on mode/header/tab line
Date: Tue, 01 Apr 2025 18:43:08 +0300
> Date: Tue, 1 Apr 2025 15:06:49 +0200
> From:  David Ponce via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> (require 'svg)
> (let* ((w 304)
>         (h (frame-char-height))
>         (svg (svg-create w h)))
>    (svg-rectangle svg 0   0 100 h :fill "red")
>    (svg-rectangle svg 102 0 100 h :fill "green")
>    (svg-rectangle svg 204 0 100 h :fill "blue")
>    (let* ((img (svg-image svg :scale 1
>                           :map
>                           `(
>                             ((rect . ((0   . 0) . (100 . ,h)))
>                              r (help-echo "RED"   pointer hand))
>                             ((rect . ((102 . 0) . (202 . ,h)))
>                              g (help-echo "GREEN" pointer hand))
>                             ((rect . ((204 . 0) . (304 . ,h)))
>                              b (help-echo "BLUE"  pointer hand))
>                             )))
>           (full (propertize " " 'display img))
>           (cut  (propertize " " 'display `((slice 102 0 202 1.0) ,img)))
>           (both (concat cut " " full)))
>      (setq header-line-format both)
>      (insert both "\n")))
> 
> I'm reporting this inconsistency, at least to find out if it's a real
> bug or a limitation that needs to be addressed by the programmer.

Bug.  And a very old one.  Should be fixed now on the master branch;
please test.




This bug report was last modified 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.