From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <8634jvmbug.fsf@gnu.org> References: <86r08dmm0h.fsf@gnu.org> <86plnxmfdt.fsf@gnu.org> <86y12kjks0.fsf@gnu.org> <86a5ezjkx8.fsf@gnu.org> <86zfmzhvdb.fsf@gnu.org> <86wmi3hu4o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21954"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73863@debbugs.gnu.org, joaotavora@gmail.com, romain.ouabdelkader@gmail.com To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 13 15:49:33 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tBEgU-0005Wn-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Nov 2024 15:49:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBEg7-0005RA-4S; Wed, 13 Nov 2024 09:49:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBEg3-0005Qy-DJ for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 09:49:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBEg2-00038p-VK for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 09:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=jKAFf9RDEPu1S7/87cmQUqjjzRfqpqSz+pfv6zR+kMA=; b=kqEOkiiK5ub+pmUTTKK/BO3npUcWyBRegKw6Y6caY2wXHrcUDPv9VZRhiQry0rxUdeKlRfd5s9svWDuR98AlkJz1/24lCCV7ObvXMUApjvphYn9EjSu5K7Y4V5yd50DsRpHAxaCsEOtHStJhaOBWK702e4qEbS/KqGrOc1jSnhhdqxpjR7+0Qz3+E+GuPumavHsQZvAgCj1ihyesfwzk029iG7NBX5XuvcRjktg0kgMEk9My5dX2OTkWJnA8gtbg4LokP9dOZcQy9q6t86obWi87h0uT8QKY7JlhzdxOeEs7yxTEuJHaNyS97ZU/DkJf3t+ZpBXJrldXW9Zkukt3Iw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBEg2-0002S4-H7 for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2024 09:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2024 14:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73863 X-GNU-PR-Package: emacs Original-Received: via spool by 73863-submit@debbugs.gnu.org id=B73863.17315092869346 (code B ref 73863); Wed, 13 Nov 2024 14:49:02 +0000 Original-Received: (at 73863) by debbugs.gnu.org; 13 Nov 2024 14:48:06 +0000 Original-Received: from localhost ([127.0.0.1]:41394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBEf7-0002Qg-OE for submit@debbugs.gnu.org; Wed, 13 Nov 2024 09:48:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBEf3-0002Q8-Tz for 73863@debbugs.gnu.org; Wed, 13 Nov 2024 09:48:03 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBEcn-0002rU-Ak; Wed, 13 Nov 2024 09:45:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jKAFf9RDEPu1S7/87cmQUqjjzRfqpqSz+pfv6zR+kMA=; b=CPRrYrrNPbLiwMDTYPeL /t6Zl7SGg8NtZ3x29yVyER0Co9LgTlTIPWcPqWEnlnrpr3B2BeEAuuu3CjgaVuXo+83s4c+kA84nv hwm+No7mBoBStGz3a1KcWXZmeAbPvLAhG4ThNbJkNS0yZ71vb/5DvgwnmlU6Vr9+5sRDXVRgXHvG4 kIL+5HmZ37ysU8MLlva5uNrcdwvvIABGZcuzpXmDio0nRGUJBoOMpiF2UfT+JYpexqSMuQmWKoj7S +HCFvmzatt1uZU7DYG1/y/bZnOmpwRVcp7GhRffNc1s7s6ocK35uORv/rMZTYy21M3mN2ot5opHjU ZRQAAm4cNHNzpg==; In-Reply-To: (message from Spencer Baugh on Tue, 12 Nov 2024 16:38:43 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295274 Archived-At: > From: Spencer Baugh > Cc: João Távora , Eli Zaretskii > , > 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.