GNU bug report logs - #76107
Consider image specs when scanning for a column

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Thu, 6 Feb 2025 23:30:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thuna <thuna.cing <at> gmail.com>
Cc: 76107 <at> debbugs.gnu.org
Subject: bug#76107: Consider image specs when scanning for a column
Date: Fri, 07 Feb 2025 21:55:56 +0200
> From: Thuna <thuna.cing <at> gmail.com>
> Cc: 76107 <at> debbugs.gnu.org
> Date: Fri, 07 Feb 2025 18:37:00 +0100
> 
> > But everything is _not_ visible.  For example, if the image is at the
> > left edge of the window and the window is hscrolled, part of the image
> > will be invisible, and the columns of characters after it will be
> > incorrect.
> 
> Maybe I have this all wrong, but shouldn't we be scanning from the very
> beginning of the line, and not just the _visible_ beginning?
> 
> When we have a row with the contents
> 
>   "some long text with a lot of characters that we need to scroll to see properly"
> 
> and we have it hscrolled until the visible row starts at "characters",
> current-column at the start of "characters" is still 29 and not 0.
> 
> Similarly, I would think that given
> 
>   "#<image :width 10em>foo bar"
> 
> with the buffer hscrolled until it only shows "foo bar", we would want
> current-column at the start of "foo" to be 10 and not 0, even though the
> display width of the image is 0 (since it's not visible), because the
> "actual" width of the image (that is, what its width _would_ be if we
> could see it all) is 10.

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?




This bug report was last modified 49 days ago.

Previous Next


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