[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32978: 26.1; newline-and-indent duplicates displayed image
From: |
Eli Zaretskii |
Subject: |
bug#32978: 26.1; newline-and-indent duplicates displayed image |
Date: |
Mon, 15 Oct 2018 05:33:56 +0300 |
tags 32978 notabug
thanks
> From: Markus Triska <triska@metalevel.at>
> Cc: 32978@debbugs.gnu.org
> Date: Sun, 14 Oct 2018 22:40:50 +0200
>
> > Not sure why you expected that. Perhaps you thought that forward-char
> > will move to after the image?
>
> Yes indeed! Since a single forward-char moves over the image when used
> interactively, I got the impression that the image is only a single
> character. From your code example, I see that this is not the case!
No, it's not. You can see in image-file.el that what
insert-image-file does is insert the entire image file into the
buffer, and then put a 'display' property over all those bytes. So
the image spans many characters in this case.
> I think a very good solution would be to document the return value of
> insert-image-file, i.e., to add to its description a statement such as:
>
> Returns list of absolute file name and number of characters
> inserted.
>
> What do you think?
I was thinking the same; will do.