Subject: Re: bug#52163: 28.0.60; visual-line-mode breaks C-a and C-e in extreme case

From: Phil Sainty <[email-masked]>
Date: Sun, 16 Jan 2022 22:58:34 +1300

On 2022-01-16 20:22, Eli Zaretskii wrote:
> Where do you want Emacs to place the cursor when there's no
> whitespace at end of visual line?
> 
> IOW, before declaring that there is a problem, please be sure to
> consider any reasonable solutions.

In this scenario I would expect it to place the cursor on the final
character of the original visual line, rather than the first character
of the subsequent visual line.

If you do C-a C-e C-a and the two C-a commands take you to two
different positions (and indeed different lines), I think that is very
strange indeed.

Regardless of the solution, there is no whitespace for the cursor to
be positioned at, so I think the decision to use position N+1 rather
than N seems somewhat arbitrary, and unintuitive as a "Move point to
end of current line" behaviour.

I expect the counter argument is that the first character of the next
line *is* the position at the end of the visual line if it's not
possible to break that line (i.e. the region between the C-a and C-e
positions is indeed the entire visual line); but I think visual lines
are such a dynamic notion to begin with (depending on window width,
font size, etc, etc), and the "end" of an unbreakable line an even
fuzzier notion, that using the position of the last char of that line
doesn't seem like it would be very problematic for most users.

A user option to select between the two behaviours would be nice.

-Phil