Subject: bug#76107: Consider image specs when scanning for a column

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Feb 2025 21:28:58 +0200

> From: Thuna <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 08 Feb 2025 19:56:45 +0100
> 
> > Maybe you are right.  But anyway, this is not the main point I was
> > trying to make.  The main point is that using image-size is not
> > accurately reproduce the actual horizontal coordinate on the screen.
> >
> > Can you tell why you need image support in current-column and friends?
> > E.g., why posn-col-row and vertical-motion cannot do what you need?
> 
> I'm trying to get fill-paragraph (and visual-fill-column-mode) to work
> properly in Org buffers with lots of previewed inline latex fragments.
> fill-paragraph internally uses move-to-column, so that's what I'm
> patching.  This isn't limited to Org, though.  Better image handling (or
> at all) by default is a good thing to have in general.

I understand the reason now, but my opinion is still the same: proper
support for columns requires simulating the display, and the two
functions I mentioned already do that.  So if we want fill-paragraph
to work in the presence of images and other display features, we need
to have a specialized fill-paragraph-function which uses posn-col-row
instead of current-column and vertical-motion instead of
move-to-column.  I don't see a good reason for adding semi-working
image support to current-column and move-to-column.