GNU bug report logs - #32978
26.1; newline-and-indent duplicates displayed image

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sun, 7 Oct 2018 21:20:02 UTC

Severity: normal

Tags: notabug

Found in version 26.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 32978 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 32978 <at> debbugs.gnu.org
Subject: Re: 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 <at> metalevel.at>
> Cc: 32978 <at> 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.




This bug report was last modified 6 years and 32 days ago.

Previous Next


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