From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 52163@debbugs.gnu.org, larsi@gnus.org, iung@autistici.org
Subject: bug#52163: 28.0.60; visual-line-mode breaks C-a and C-e in extreme case
Date: Sun, 16 Jan 2022 13:03:51 +0200 [thread overview]
Message-ID: <83y23gx7qg.fsf@gnu.org> (raw)
In-Reply-To: <d92a50fcef5f957e154aacffa241daa6@webmail.orcon.net.nz> (message from Phil Sainty on Sun, 16 Jan 2022 23:55:39 +1300)
> Date: Sun, 16 Jan 2022 23:55:39 +1300
> From: Phil Sainty <psainty@orcon.net.nz>
> Cc: larsi@gnus.org, 52163@debbugs.gnu.org, iung@autistici.org
>
> I've just remembered `overflow-newline-into-fringe'. AFAIK that only
> has an effect on lines which are *exactly* the window-width characters
> wide, but it occurs to me that this fringe behaviour/visualisation
> could be used to create a more intuitive solution for the unbreakable
> visual line situation, allowing C-e to visually position the cursor at
> the end of the visual line (in the fringe) rather than the start of
> the next line.
This will cause other problems.
> It might be quite a special-case approach -- the fringe position would
> be the same position as the start of the next visual line, so Emacs
> would need a way to decide which of those two visual places to render
> the cursor; and in order for C-a to then move to the start of the same
> visual line Emacs would need to know that it had previously been
> rendering the cursor in the fringe, so probably the C-a and C-e
> commands would be handling this explicitly.
Exactly. And since overflow-newline-into-fringe is implemented in the
display engine, any information about which commands got us there
cannot be relied upon.
Moreover, this isn't exactly what overflow-newline-into-fringe is
about. That feature is used when point is on the newline that ends a
line. Since the newline has no visual representation, we can put the
cursor on the fringe, and C-f/C-b still do what is expected. Not so
in this case, where point is actually on the first character of the
next screen line.
> It sounds kinda fiddly/complicated, and I'm not requesting that anyone
> tackle this, but I wanted to describe the idea here in case anyone
> else thinks it's worth looking into.
Thanks.
prev parent reply other threads:[~2022-01-16 11:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-28 14:49 bug#52163: 28.0.60; visual-line-mode breaks C-a and C-e in extreme case iung--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-28 17:07 ` Eli Zaretskii
2022-01-15 13:08 ` Lars Ingebrigtsen
2022-01-15 22:53 ` Phil Sainty
2022-01-16 7:22 ` Eli Zaretskii
2022-01-16 9:58 ` Phil Sainty
2022-01-16 10:18 ` Eli Zaretskii
2022-01-16 10:23 ` Eli Zaretskii
2022-01-16 11:08 ` Phil Sainty
2022-01-16 10:55 ` Phil Sainty
2022-01-16 11:03 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y23gx7qg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=52163@debbugs.gnu.org \
--cc=iung@autistici.org \
--cc=larsi@gnus.org \
--cc=psainty@orcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).