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: Sun, 20 Oct 2024 18:31:40 +0300 Message-ID: <86iktmiyeb.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=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14591"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 73863@debbugs.gnu.org, romain.ouabdelkader@gmail.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 20 17:33:08 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 1t2XvV-0003Vu-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 17:33:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2Xv5-0000wJ-IL; Sun, 20 Oct 2024 11:32:39 -0400 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 1t2Xv3-0000w2-LO for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 11:32:38 -0400 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 1t2Xv3-0003bp-CR for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 11:32:37 -0400 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=BS8y/EUE2ubS4QdgzzQ4nXfWlvnfdLVHk5Xp1iVAd8M=; b=nCXog1WaxBjOJhqmU4/Sb5RoaoLkUya9Y0OPREt/cz39tKogu2cKeYjo6kQSRnhMsZSM3C4Jw7XGzitkhHC1eNCA/4cvlVskJh8HzxGpvwY1d/gfGAVkg+jvxOMvDFfEt6jUcGejqLLyhPmlIwUq31iZiIc4thSur3EZpeSs/u3Mlpxp8thbC92t+U7DJoC1+9jenKFswYH35RQizRtndzJbx+HJyq9diid8y/NdBlKkwEUiuuw7tHB9BwgVe3lxo4wK7c2V1a6/aBJpQr3ZrnLIrUeT8eSccCoKc2t8wCEgup6dxgUigJTVmiYw5k/HmoUO32ew+RJ8GE63XLSp6A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2XvS-00064b-4i for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 11:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2024 15:33: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.172943833823263 (code B ref 73863); Sun, 20 Oct 2024 15:33:02 +0000 Original-Received: (at 73863) by debbugs.gnu.org; 20 Oct 2024 15:32:18 +0000 Original-Received: from localhost ([127.0.0.1]:48119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Xuj-000639-Pw for submit@debbugs.gnu.org; Sun, 20 Oct 2024 11:32:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2Xuh-00062i-1T for 73863@debbugs.gnu.org; Sun, 20 Oct 2024 11:32:16 -0400 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 1t2XuB-0003YC-OG; Sun, 20 Oct 2024 11:31:43 -0400 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=BS8y/EUE2ubS4QdgzzQ4nXfWlvnfdLVHk5Xp1iVAd8M=; b=JP+ol+XyLrjzFZPJzA/9 4SmLWzgafZW/UGLyKvG/y4bkUF5hWLkg0tWNYv9gwNle/WiHlEpRcl/Me2KPlOBQpyVOVQA6ml3Gd 17IuTaxReCUarx3KMc1zOzGtMqILtDUxE8KWMuVZezQSkD56P3DD2vumw7VFXg2H9wapoTkWeVKmp RlGFiuYEemEAU9wgOJxAQBM1bCfrj/svJowk1TKOUwuKE9JTrX1SFmT/QB3iKOK/qZ52JRSrKaUCN RxlyA6eFmUQmuoswXI/C43OlGBZiXASr0/5+BD98GmaySF7wKqFPl8oh5TX5R2KvXY9dNkv3AQHe0 fC/jh6zDBt2fmA==; In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sun, 20 Oct 2024 15:42:15 +0100) 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:293977 Archived-At: > From: João Távora > Date: Sun, 20 Oct 2024 15:42:15 +0100 > Cc: sbaugh@janestreet.com, romain.ouabdelkader@gmail.com, > 73863@debbugs.gnu.org > > On Sun, Oct 20, 2024 at 12:49 PM Eli Zaretskii wrote: > > > That would mean a non-trivial code in flymake.el, because it would > > need to decide in advance whether the diagnostic will fit on the same > > screen line. Moreover, if the user then makes the window wider or > > narrower, the cursor will jump between two screen positions, something > > that I think is highly undesirable (and will look like a bug). > > Yes, you're right, but the solution you propose is arguably harmful for > the current case. If I'm at line n, column c and I move down to line n+1 with > less than c columns, and that line n+1 has a wrapping diagnostic at eol, I now > see that a single 'down' makes the cursor jump multiple screen lines > to the end > of said diagnostic, and that's not really pretty either. And even > closer to this > report's scenario, your solution only makes some sense if the overlays happen > to only wrap one line: it ceases to make sense in very narrow windows > where the overlays wrap multiple lines. Emacs can only display the cursor either before or after the overlay string. Anything else requires the 'cursor' property to be placed dynamically, depending on what is column c in your scenario, and I don't think it's reasonable to require flymake.el to jump through such hoops. > IMO, wrapping these annotations is more distracting than useful. > They're meant to be minimally intrusive auxiliary visual aids, and causing > screen line increase violates that. Note that the full diagnostic info can be > viewed via eldoc in the echo area for example, where there are options to > control length and jumping (and where window width isn't an issue). > > So I advise to turn on line truncation when using them, or to live with the > current idiosyncrasy instead of another equivalent (IMO slightly worse) > idiosyncrasy. That is also fine by me. But note that the code itself could have lines that wrap, and in that case, line truncation will make some of the code invisible until horizontally-scrolled into view. So it's a difficult situation. Was displaying the diagnostic in a tooltip ever considered as the alternative to this past-EOL display?