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#57433: Emacs no longer moves point into visible port of the buffer Date: Sat, 27 Aug 2022 19:25:42 +0300 Message-ID: <83bks5zm9l.fsf@gnu.org> References: <83y1vayqrm.fsf@gnu.org> <83v8qeypm5.fsf@gnu.org> <83sfliyonr.fsf@gnu.org> <83pmgmymdw.fsf@gnu.org> <83h71xznnn.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="16828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 57433@debbugs.gnu.org To: Paul Pogonyshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 27 18:26:28 2022 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 1oRydf-0004FL-WD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 18:26:28 +0200 Original-Received: from localhost ([::1]:37954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRyde-0002y0-EM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 12:26:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRydH-0002xs-Bo for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 12:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRydG-00058o-Hp for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 12:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRydG-0004Sp-Ch for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 12:26: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: Sat, 27 Aug 2022 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57433 X-GNU-PR-Package: emacs Original-Received: via spool by 57433-submit@debbugs.gnu.org id=B57433.166161754917139 (code B ref 57433); Sat, 27 Aug 2022 16:26:02 +0000 Original-Received: (at 57433) by debbugs.gnu.org; 27 Aug 2022 16:25:49 +0000 Original-Received: from localhost ([127.0.0.1]:56920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRyd2-0004SN-GA for submit@debbugs.gnu.org; Sat, 27 Aug 2022 12:25:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRyd0-0004SA-QG for 57433@debbugs.gnu.org; Sat, 27 Aug 2022 12:25:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRycv-0004xi-G3; Sat, 27 Aug 2022 12:25:41 -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=DohV8KR0EIL08+629fT+J6Qeg0zJjVz7b/Ii9INV9xs=; b=mnMG7Muia0/IV1vU+gYG bBlRmeG36Ddqv8mZ6D1LGafyVCCkiUjFAMzZka3BwouW1rYWJ8+O6F2Wd2TFo9fj2pMdXNAQFmR/V nVqaGSGEhb4UGRYbLeZc9feHY9MpMEZW5rq+oXX8vmLXUDj3Rng90p0ku55qCZORj2t+rYBKexTn4 dP4vcsGKpelMPjge1Rui+tw0lpkU7rpqz47MLPKMKJqvK/kEe9/cEk7HOEXDEIWT36djF8s8BmHFQ 88zB5b2BXRJgNgs01BOe4iUEuFsxh1aNis9j6nLaphZIjUB5CQvoeCDJSZEx+Hzks/mNRBdWVr1dE JSX1gibYwH8nNw==; Original-Received: from [87.69.77.57] (port=2209 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRycg-0006ry-Ml; Sat, 27 Aug 2022 12:25:36 -0400 In-Reply-To: (message from Paul Pogonyshev on Sat, 27 Aug 2022 18:06:59 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:240953 Archived-At: > From: Paul Pogonyshev > Date: Sat, 27 Aug 2022 18:06:59 +0200 > Cc: Gerd Möllmann , > 57433-done@debbugs.gnu.org > > Setup: Magit buffer with staged files, at least two. It looks like this: > > Staged changes (N) > modified file1 > [invisible diff of file1] > modified file2 > [invisible diff of file2] > > so essentially I, as a user, only see this in UI: > > Staged changes (N) > modified file1 > modified file2 > > Now, I put the point at the beginning of the third line ([^] is the point): > > Staged changes (N) > modified file1 > [^]modified file2 > > I press C-b, expecting that the point is moved to the end of the > previous line that I see. But it is not moved there, this is the result: > > Staged changes (N) > modified file1 > [^]modified file2 > > In reality, the point is in the invisible (to me, as the user) diff for file1. > If I press C-b again, only now point is moved like I expected it to be > moved the last time: > > Staged changes (N) > modified file1[^] > modified file2 I cannot reproduce this, if I try to simulate it by having those 4 lines with two lines invisible. So I think there's something else at work here. If you can show a simple recipe that doesn't involve Magit, I can look into what happens there. (And it probably warrants a separate bug report.) What I did was to have this text: modified file1 [invisible diff of file1] modified file2 [invisible diff of file2] (without the indentation) in a buffer, and then I manually put the invisible text property on the 2nd and the 4th lines. Then I moved the cursor with C-b from the beginning of "modified file2", and the cursor was displayed at the end of the previous visible line, the one which says "modified file1". > So, the presence of invisible text between lines 2 and 3 changes the > way C-b behaves and breaks my (as a user of Emacs) expectations, > disrupting established editing flow. I'd say that the invisible text > should count as implementation details and shouldn't affect user- > visible results at all. > > What do you think? It works for me the way you expect it to work, so I'm not yet sure what's going on in the Magit buffer.