bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64988: 30.0.50; move-to-column can move across lines if there is a t


From: Herman, Geza
Subject: bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property
Date: Tue, 1 Aug 2023 16:32:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0



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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]