unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together
@ 2019-02-04 14:54 Jarosław Rzeszótko
  2019-02-04 16:21 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Jarosław Rzeszótko @ 2019-02-04 14:54 UTC (permalink / raw)
  To: 34312

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

I run Emacs 26.1 with a config of just:

(setq scroll-error-top-bottom t)
(setq scroll-preserve-screen-position 'always)

I open a long file, hit PageDown, then the Down key a few times. Point is
at some position X now. I come back to the beginning of buffer by hitting
PageUp twice. The point is now in the top left corner of the window. Here
comes the bug: I hit PageDown and point is moved to position X, rather than
to the top left corner of the portion of the buffer that was just made
visible by the scrolling. The scrolling itself seems to work OK.

Cheers,
Jarosław Rzeszótko

[-- Attachment #2: Type: text/html, Size: 704 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together
  2019-02-04 14:54 bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together Jarosław Rzeszótko
@ 2019-02-04 16:21 ` Eli Zaretskii
  2019-02-04 18:59   ` Jarosław Rzeszótko
  2021-06-23 13:51   ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-02-04 16:21 UTC (permalink / raw)
  To: Jarosław Rzeszótko; +Cc: 34312

> From: Jarosław Rzeszótko
> 	<jrzeszotko@gmail.com>
> Date: Mon, 4 Feb 2019 15:54:58 +0100
> 
> (setq scroll-error-top-bottom t)
> (setq scroll-preserve-screen-position 'always)
> 
> I open a long file, hit PageDown, then the Down key a few times. Point is at some position X now. I come back
> to the beginning of buffer by hitting PageUp twice. The point is now in the top left corner of the window. Here
> comes the bug: I hit PageDown and point is moved to position X, rather than to the top left corner of the
> portion of the buffer that was just made visible by the scrolling.

Maybe I'm missing something, but this is the behavior I'd expect, I
wouldn't consider it a bug.  Emacs moved point to the top of the
buffer only because there was an error.  Once the error is gone, it
goes back to the remembered screen position.

Does anyone else think this is a bug?

Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together
  2019-02-04 16:21 ` Eli Zaretskii
@ 2019-02-04 18:59   ` Jarosław Rzeszótko
  2021-06-23 13:51   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Jarosław Rzeszótko @ 2019-02-04 18:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34312

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

On Mon, Feb 4, 2019 at 5:21 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Jarosław Rzeszótko
> >       <jrzeszotko@gmail.com>
> > Date: Mon, 4 Feb 2019 15:54:58 +0100
> >
> > (setq scroll-error-top-bottom t)
> > (setq scroll-preserve-screen-position 'always)
> >
> > I open a long file, hit PageDown, then the Down key a few times. Point
> is at some position X now. I come back
> > to the beginning of buffer by hitting PageUp twice. The point is now in
> the top left corner of the window. Here
> > comes the bug: I hit PageDown and point is moved to position X, rather
> than to the top left corner of the
> > portion of the buffer that was just made visible by the scrolling.
>
> Maybe I'm missing something, but this is the behavior I'd expect, I
> wouldn't consider it a bug.  Emacs moved point to the top of the
> buffer only because there was an error.  Once the error is gone, it
> goes back to the remembered screen position.
>
> Does anyone else think this is a bug?
>
> Thanks.
>

I would expect PageDown behavior to be dependent only on what portion of
the buffer is visible on the screen and on where the point is, here it
appears it is additionally dependent on the history of how the point got
where it is, or in effect on some internal state of the Emacs C runtime,
that is probably not even in any way accessible to the user.

Also, the documentation for scroll-error-top-bottom says it causes the
point to be moved *instead of* signaling an error, so it is hard to
understand why any screen position should be remembered or why the error
should be then "gone" when you move the point again.

Cheers,
Jarosław Rzeszótko

[-- Attachment #2: Type: text/html, Size: 2163 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together
  2019-02-04 16:21 ` Eli Zaretskii
  2019-02-04 18:59   ` Jarosław Rzeszótko
@ 2021-06-23 13:51   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-23 13:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34312, Jarosław Rzeszótko

Eli Zaretskii <eliz@gnu.org> writes:

> Maybe I'm missing something, but this is the behavior I'd expect, I
> wouldn't consider it a bug.  Emacs moved point to the top of the
> buffer only because there was an error.  Once the error is gone, it
> goes back to the remembered screen position.
>
> Does anyone else think this is a bug?

Trying this out a bit, I think this seems like pretty natural behaviour,
so I agree with Eli that this isn't a bug, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-23 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 14:54 bug#34312: scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together Jarosław Rzeszótko
2019-02-04 16:21 ` Eli Zaretskii
2019-02-04 18:59   ` Jarosław Rzeszótko
2021-06-23 13:51   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).