all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Pogonyshev <pogonyshev@gmail.com>
Cc: gerd.moellmann@gmail.com, 57433@debbugs.gnu.org
Subject: bug#57433: Emacs no longer moves point into visible port of the buffer
Date: Sat, 27 Aug 2022 19:25:42 +0300	[thread overview]
Message-ID: <83bks5zm9l.fsf@gnu.org> (raw)
In-Reply-To: <CAG7Bpaq=79WB0G0+p0_1a7M+CYv7VutysteXyNc9JaWQj+7H4A@mail.gmail.com> (message from Paul Pogonyshev on Sat, 27 Aug 2022 18:06:59 +0200)

> From: Paul Pogonyshev <pogonyshev@gmail.com>
> Date: Sat, 27 Aug 2022 18:06:59 +0200
> Cc: Gerd Möllmann <gerd.moellmann@gmail.com>, 
> 	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.





  parent reply	other threads:[~2022-08-27 16:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 16:32 bug#57433: Emacs no longer moves point into visible port of the buffer Paul Pogonyshev
2022-08-27  6:55 ` Gerd Möllmann
2022-08-27  8:08   ` Gerd Möllmann
2022-08-27  8:53     ` Gerd Möllmann
2022-08-27  9:33       ` Eli Zaretskii
2022-08-27  9:55         ` Gerd Möllmann
2022-08-27  9:58         ` Eli Zaretskii
2022-08-27 10:02           ` Gerd Möllmann
2022-08-27 10:19             ` Eli Zaretskii
2022-08-27 10:43               ` Gerd Möllmann
2022-08-27 11:08                 ` Eli Zaretskii
2022-08-27 14:07                   ` Paul Pogonyshev
2022-08-27 14:28                     ` Gerd Möllmann
2022-08-27 15:47                       ` Paul Pogonyshev
2022-08-27 15:55                         ` Eli Zaretskii
2022-08-27 16:06                           ` Paul Pogonyshev
2022-08-27 16:12                             ` Paul Pogonyshev
2022-08-27 16:29                               ` Eli Zaretskii
2022-08-27 16:32                                 ` Paul Pogonyshev
2022-08-27 16:37                                   ` Paul Pogonyshev
2022-08-27 16:56                                   ` Eli Zaretskii
2022-08-27 17:01                                     ` Paul Pogonyshev
2022-08-27 17:11                                       ` Paul Pogonyshev
2022-08-27 16:25                             ` Eli Zaretskii [this message]
2022-08-27 15:13                     ` Eli Zaretskii
2022-08-27  9:47 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bks5zm9l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57433@debbugs.gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=pogonyshev@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.