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 13:56:12 +0300
> Cc: 42521 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Sat, 25 Jul 2020 13:26:19 +0300
> 
> Like supporting image spec placed on 'before-string' instead of 'display':
> 
> (progn
>    (erase-buffer)
>    (insert " ")
>    (setq o (make-overlay (point-min) (point)))
>    (overlay-put o 'display
>                 (propertize " text after image"
>                             'before-string
>                             (create-image "splash.svg" nil nil
>                                           :max-height
>                                           (default-font-height)))))
> 
> If this worked, I would actually prefer it.

This puts a 'before-string' property on a display string.  But
'before-string' is an overlay property, not a text property, so it
cannot be put on a string, only on buffer text.




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

Previous Next


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