GNU bug report logs - #57433
Emacs no longer moves point into visible port of the buffer

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Fri, 26 Aug 2022 16:33:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 57433-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Pogonyshev <pogonyshev <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 57433-done <at> debbugs.gnu.org
Subject: Re: bug#57433: Emacs no longer moves point into visible port of the
 buffer
Date: Sat, 27 Aug 2022 18:12:49 +0200
[Message part 1 (text/plain, inline)]
Actually, disregard that. It appears to be a Magit bug. If I switch the
buffer
to any other mode, everything behaves as expected.

Paul

On Sat, 27 Aug 2022 at 18:06, Paul Pogonyshev <pogonyshev <at> gmail.com> wrote:

> > The "reason" is largely a side-effect of the implementation, I
> > suspect.
>
> Would it then not be a good idea to improve it (not as part of this bug,
> of course)? E.g. currently the behavior is like below.
>
> 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
>
> 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?
>
> Paul
>
>
> On Sat, 27 Aug 2022 at 17:55, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Paul Pogonyshev <pogonyshev <at> gmail.com>
>> > Date: Sat, 27 Aug 2022 17:47:32 +0200
>> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 57433 <at> debbugs.gnu.org
>> >
>> > > Strange.  Could you please double-check that you have commit
>> > > a2d62456a7b8da27fb9b64f71b6ce588f2d73287 in your worktree?
>> >
>> > I have rebuilt Emacs and now it works. I previously tried with applying
>> > the patch from "In that case, can you see if the patch below solves the
>> > original issue with Magit?" locally, but apparently did something wrong.
>> >
>> > So yes, it works for me now, sorry.
>>
>> No need to be sorry, thanks for testing the fix.  I'm therefore
>> closing the bug.
>>
>> > > I think you are reading too much into what that text says.  It says
>> > > that point moves to the edge of such a sequence, and that is what
>> > > happens here.  No more, no less.
>> >
>> > Yeah, I see now that if you move with C-b, the point disappears within
>> > the diff for the previous file, even with Emacs 28, and then Magit
>> > misbehaves. To be honest, I'm not sure if that is useful (or maybe there
>> > is some reason for moving "to the edge" rather than outside an
>> > invisible sequence), but that's certainly not a regression in Emacs.
>>
>> The "reason" is largely a side-effect of the implementation, I
>> suspect.
>>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.