GNU bug report logs - #34312
scroll-error-top-bottom and scroll-preserve-screen-position do not work correctly together

Previous Next

Package: emacs;

Reported by: Jarosław Rzeszótko <jrzeszotko <at> gmail.com>

Date: Mon, 4 Feb 2019 14:56:02 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34312 in the body.
You can then email your comments to 34312 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34312; Package emacs. (Mon, 04 Feb 2019 14:56:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jarosław Rzeszótko <jrzeszotko <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 04 Feb 2019 14:56:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jarosław Rzeszótko <jrzeszotko <at> gmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: scroll-error-top-bottom and scroll-preserve-screen-position do not
 work correctly together
Date: Mon, 4 Feb 2019 15:54:58 +0100
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34312; Package emacs. (Mon, 04 Feb 2019 16:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 34312 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jarosław Rzeszótko <jrzeszotko <at> gmail.com>
Cc: 34312 <at> debbugs.gnu.org
Subject: Re: bug#34312: scroll-error-top-bottom and
 scroll-preserve-screen-position do not work correctly together
Date: Mon, 04 Feb 2019 18:21:39 +0200
> From: Jarosław Rzeszótko
> 	<jrzeszotko <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34312; Package emacs. (Mon, 04 Feb 2019 19:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 34312 <at> debbugs.gnu.org (full text, mbox):

From: Jarosław Rzeszótko <jrzeszotko <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34312 <at> debbugs.gnu.org
Subject: Re: bug#34312: scroll-error-top-bottom and
 scroll-preserve-screen-position do not work correctly together
Date: Mon, 4 Feb 2019 19:59:08 +0100
[Message part 1 (text/plain, inline)]
On Mon, Feb 4, 2019 at 5:21 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Jarosław Rzeszótko
> >       <jrzeszotko <at> 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
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34312; Package emacs. (Wed, 23 Jun 2021 13:52:01 GMT) Full text and rfc822 format available.

Message #14 received at 34312 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34312 <at> debbugs.gnu.org,
 Jarosław Rzeszótko <jrzeszotko <at> gmail.com>
Subject: Re: bug#34312: scroll-error-top-bottom and
 scroll-preserve-screen-position do not work correctly together
Date: Wed, 23 Jun 2021 15:51:31 +0200
Eli Zaretskii <eliz <at> 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




bug closed, send any further explanations to 34312 <at> debbugs.gnu.org and Jarosław Rzeszótko <jrzeszotko <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 23 Jun 2021 13:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jul 2021 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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