unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Marc Feeley <feeley@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <83li2wotfd.fsf@gnu.org> (raw)
In-Reply-To: <B038391F-ACF2-44B9-9133-3CB1CEC12746@iro.umontreal.ca>

> From: Marc Feeley <feeley@iro.umontreal.ca>
> 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	other threads:[~2013-09-17  6:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17  2:37 There should be an option to set the display size of an image to zero Marc Feeley
2013-09-17  6:26 ` Eli Zaretskii [this message]
2013-09-17  7:19   ` Stephen J. Turnbull
2013-09-17  7:31     ` Eli Zaretskii
2013-09-17 12:50       ` Marc Feeley
2013-09-17 14:02         ` Eli Zaretskii
2013-09-17 14:43           ` Marc Feeley
2013-09-17 16:10             ` Eli Zaretskii
2013-09-17 16:15               ` Marc Feeley
2013-09-17 16:56                 ` chad
2013-09-17 21:57               ` Stefan Monnier
2013-09-18  6:56                 ` Eli Zaretskii
2013-09-18 15:18                   ` Jan Djärv
2013-09-18 16:10                   ` Stefan Monnier
2013-09-18 16:38                     ` Eli Zaretskii
2013-09-18 17:06                       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83li2wotfd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=feeley@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).