From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 73863@debbugs.gnu.org, joaotavora@gmail.com,
romain.ouabdelkader@gmail.com
Subject: bug#73863: 30.0.91; Unexpected cursor movement with flymake-show-diagnostics-at-end-of-line
Date: Wed, 13 Nov 2024 16:45:27 +0200 [thread overview]
Message-ID: <8634jvmbug.fsf@gnu.org> (raw)
In-Reply-To: <ierr07gt9ng.fsf@janestreet.com> (message from Spencer Baugh on Tue, 12 Nov 2024 16:38:43 -0500)
> From: Spencer Baugh <sbaugh@janestreet.com>
> Cc: João Távora <joaotavora@gmail.com>, Eli Zaretskii
> <eliz@gnu.org>,
> 73863@debbugs.gnu.org
> Date: Tue, 12 Nov 2024 16:38:43 -0500
>
> There's actually another symmetric issue to B: after moving to the end
> of the line with C-e, if you hit C-p that moves to the start of the
> current screen line, instead of moving to the previous screen line.
> This is because vertical-motion acts as if the cursor is on screen line
> 3, when it's actually on screen line 2 because of the 'cursor property.
>
> Arguably this is a bug in vertical-motion: if you run (vertical-motion
> 1) or (vertical-motion -1) in the appropriate places, it returns 1 or
> -1, claiming that it moved by a screen line even though it actually
> stayed on the same screen line.
No, it isn't a bug: vertical-motion works with point, not with the
screen position of the cursor. And point is on the next screen line,
because the diagnostic overlay "covers" the newline at EOL.
> I'm not sure how to fix this. IMO, vertical-motion should try harder to
> move by screen lines.
Feel free to teach vertical-motion about the 'cursor' property. I
don't plan on doing that any time soon, having spent numerous hours on
making that function cater to quite a few complications.
> In the C-p case, there's an obviously correct thing to do: move to the
> same column of the previous screen line. But for some reason,
> vertical-motion doesn't do it: it stays on the same screen line. Maybe
> fixing this should start there?
See above: vertical-motion works perfectly correctly in that case, you
are just tricked by the fact that the 'cursor' property forces us to
show the cursor not where point is.
next prev parent reply other threads:[~2024-11-13 14:45 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 15:09 bug#73863: 30.0.91; Unexpected cursor movement with flymake-show-diagnostics-at-end-of-line Romain Ouabdelkader
2024-10-18 16:08 ` Eli Zaretskii
2024-10-18 16:24 ` Romain Ouabdelkader
2024-10-18 18:31 ` Eli Zaretskii
2024-10-18 19:10 ` Romain Ouabdelkader
2024-10-19 13:15 ` Eli Zaretskii
2024-10-19 13:41 ` Romain Ouabdelkader
2024-10-20 7:25 ` Eli Zaretskii
2024-10-20 9:28 ` João Távora
2024-10-20 11:22 ` Eli Zaretskii
2024-10-20 11:38 ` João Távora
2024-10-20 11:49 ` Eli Zaretskii
2024-10-20 14:42 ` João Távora
2024-10-20 15:01 ` Romain Ouabdelkader
2024-10-20 15:49 ` Eli Zaretskii
2024-10-20 16:23 ` Eli Zaretskii
2024-11-12 21:38 ` Spencer Baugh via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 14:45 ` Eli Zaretskii [this message]
2024-10-20 15:31 ` Eli Zaretskii
2024-10-20 15:39 ` João Távora
2024-10-20 16:30 ` Eli Zaretskii
2024-10-20 16:58 ` João Távora
2024-10-20 17:50 ` Eli Zaretskii
2024-10-20 18:05 ` João Távora
2024-10-20 18:28 ` Eli Zaretskii
2024-10-20 19:18 ` João Távora
2024-10-27 10:56 ` Eli Zaretskii
2024-10-30 23:57 ` Romain Ouabdelkader
2024-10-31 7:40 ` Eli Zaretskii
2024-10-31 19:18 ` Romain Ouabdelkader
2024-10-18 19:16 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18 19:25 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=8634jvmbug.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73863@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=romain.ouabdelkader@gmail.com \
--cc=sbaugh@janestreet.com \
/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).