GNU bug report logs -
#76107
Consider image specs when scanning for a column
Previous Next
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
Message #66 received at 76107 <at> debbugs.gnu.org (full text, mbox):
I have been using the patch for a while now. I have just been using it
for regular tasks, so I have not been explicitly testing any edge cases.
I have not yet had any crashes, and as far as I can see, image sizes are
being calculated correctly.
So far, I have only had two related issues: The width calculation is
incorrect when dealing with characters which are not full-sized (they
are being calculated as though they were full-sized), and left margin[1]
is being included in the column number, but only when there is an image
from line start to point.
For the second situation, here's the MRE:
1. emacs -q
2. Switch to a new buffer, turn on org-mode, insert the text
> foo \( \mathbb{R}^{*} \)
3. Call org-latex-preview on the latex fragment.
4. Eval (current-column) at the start of line, end of "foo", and the end
of line, you should see 0, 3, and 6.
5. Turn on display-line-numbers-mode, and repeat above, you should now
see 0, 3, and 10.
Alternatively, you could have the buffer contents be
> --------
> * Foo
> foo \( \mathbb{R}^{*} \)
and turn on org-indent-mode (but not display-line-numbers-mode). You'll
then see that the column at the end of the latex preview is the same as
if it were calculated from the left edge of the buffer (using the dashes
as reference).
[1] That's probably what it is? The specific thing I am
referring to is org-indent-mode and display-line-numbers-mode, which I
assume works using left margin.
This bug report was last modified 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.