GNU bug report logs - #42521
28.0.50; Can't include an image in a display string

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 24 Jul 2020 19:41:02 UTC

Severity: wishlist

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 42521 <at> debbugs.gnu.org
Subject: bug#42521: 28.0.50; Can't include an image in a display string
Date: Sat, 25 Jul 2020 08:54:48 +0300
severity 42521 wishlist
thanks

> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Fri, 24 Jul 2020 22:40:02 +0300
> 
> (progn
>    (erase-buffer)
>    (insert " ")
>    (setq o (make-overlay (point-min) (point)))
>    (overlay-put o 'display
>                 (concat (propertize " " 'display
>                                     (create-image "splash.svg" nil nil 
> :max-height
>                                                   (default-font-height)))
>                         " text after image")))
> 
> The script above will end with a blank space instead of an image being 
> displayed.

This is a documented limitation of the current design and
implementation of the 'display' property.  The ELisp manual says:

  ‘STRING’
       Display STRING instead of the text that has this property.

       Recursive display specifications are not supported—STRING’s
       ‘display’ properties, if any, are not used.

I never looked into lifting this restriction, so I don't know what
would that entail.  There are probably some complications with faces,
at least.  If someone wants to study the issue, that'd be welcome, I
think.




This bug report was last modified 4 years and 326 days ago.

Previous Next


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