indent-bars icon indicating copy to clipboard operation
indent-bars copied to clipboard

Fix move-to-column once and for all?

Open dcolascione opened this issue 11 months ago • 7 comments

#40 is biting me. According to that bug, the root cause is that indent-line-mode somehow breaks move-to-column. That's a pretty normal Emacs API. Can we make it work?

dcolascione avatar Feb 04 '25 22:02 dcolascione

Biting you how?

It does not break move-to-column, rather move-to-column is broken in that it doesn't respect display properties with newlines in them, even if those display properties are on a newline. You could attack the root cause by submitting a bug report upstream mentioning this.

Did you read the FAQ and try the workaround? The next best thing might be to get something like this into evil.

jdtsmith avatar Feb 04 '25 22:02 jdtsmith

Thanks. I read through the FAQ and the linked Emacs bug. I think we should reopen Emacs bug#64988. I don't see any good reason that we can't address the special case of a newline having a display property with exactly one newline even if addressing the moral general overlay issue is hard.

dcolascione avatar Feb 04 '25 23:02 dcolascione

I agree. If the text with the display property contains a newline, move-to-column should stop there. It can't go "inside it" on the same visual line, but that doesn't mean it should move beyond it: that's clearly worse behavior. This is a sub-case of the "hard problem" of display strings with newlines.

jdtsmith avatar Feb 05 '25 00:02 jdtsmith

Are you willing/able to post a new bug report that re-considers bug#64988 for the specific sub-case of the text with the display property containing a newline itself?

jdtsmith avatar Feb 16 '25 16:02 jdtsmith

Yeah, just haven't gotten around to it. Happen to have a minimal repro?

dcolascione avatar Feb 16 '25 19:02 dcolascione

I had worked one up earlier. But beware, looks like I had floated that already by Eli. So we'd need a new argument. That said, I don't think the argument that what matters is the text upon which the display property is placed has been fully considered.

jdtsmith avatar Feb 16 '25 20:02 jdtsmith

Any progress on this?

jdtsmith avatar Apr 17 '25 22:04 jdtsmith

Closing. If you submit a bug report we can reopen.

jdtsmith avatar Jun 28 '25 13:06 jdtsmith