GNU bug report logs -
#64988
30.0.50; move-to-column can move across lines if there is a text with display property
Previous Next
Reported by: Herman, Géza <geza.herman <at> gmail.com>
Date: Tue, 1 Aug 2023 10:55:02 UTC
Severity: normal
Tags: notabug, wontfix
Merged with 66942
Found in version 30.0.50
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 64988 <at> debbugs.gnu.org (full text, mbox):
On 8/1/23 15:26, Eli Zaretskii wrote:
> Copy text into a temporary buffer, remove 'display' properties, call
> move-to-column there, then move to the same position in the original
> buffer?
Yep, that's a possible solution, but I feel that it is such a basic
functionality, emacs should be able to solve this question without using
such workarounds. But this is just an intuition, feel free to ignore it
:) Column-enforce-mode can be already slow for large files, if it had to
do this copy all the time it would be even slower.
>> Regarding how to fix this problem: wouldn't it make sense to stop
>> calculating the width at the first "\n" in the displayed string?
> Stop calculating and do what? move-to-column doesn't just calculate,
> it should move point to some place. Where do you want to move point
> in these cases?
I understand that solving this problem if we want to stick with the
current idea of move-to-column (meaning that it has to consider display
properties), is hard, or even we can say that there are no good
solutions. But ideally, it should move the cursor to the closest
possible location in the same visual line. As far as I understand the
intention of this function.
But for my problem, I don't think that this is the way to go.
Column-enforce-mode should calculate columns without considering
properties. I'd be good if emacs gave an out-of-box solution for this
(without using copying), but if it doesn't, it's also fine.
This bug report was last modified 1 year and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.