emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: There should be an option to set the display size of an image to zer


From: Eli Zaretskii
Subject: Re: There should be an option to set the display size of an image to zero
Date: Tue, 17 Sep 2013 09:26:14 +0300

> From: Marc Feeley <address@hidden>
> Date: Mon, 16 Sep 2013 22:37:34 -0400
> 
> Images added to a buffer with put-image always occupy an area in the buffer 
> that is equal to their size.

You mean, occupy an area _on_display_, not in the buffer, right?
Because images don't occupy any area in the buffer at all, they are
displayed instead of some buffer text which can be as short as 1
character, or even _before_ some text (in which case it doesn't
replace any characters).  See this note in the ELisp manual:

     Internally, [`put-image'] creates an overlay, and gives it a
     `before-string' property containing text that has a `display'
     property whose value is the image.

This arrangement of the overlay has the effect that the image is
displayed before the text at certain buffer position, without taking
any place in the buffer itself.

> It would be nice to allow the image to be overlaid over or under the text 
> which would allow annotating the text with arrows, bubbles, etc. This could 
> be as simple as indicating a zero width and height for the image (for 
> determining the placing of text around it), but using the actual image size 
> for displaying it on the screen.

The actual problem is not with the size of the image on screen, the
actual problem is with layout.  Emacs still lays out text and images
by horizontal "rows", top to bottom.  When it needs to display an
image, it enlarges the height of the row to accommodate the image,
displays the image, then goes on with displaying text.  If I
understand correctly what you are asking for, it would need a radical
change in the display layout algorithms.  Patches are welcome.

P.S.  If I misunderstood your suggestion, apologies, and please
elaborate.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]