From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jaros=C5=82aw_?= =?UTF-8?Q?Rzesz=C3=B3tko?= Newsgroups: gmane.emacs.bugs Subject: 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-ID: References: <83ef8nv818.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000010d49d05811617f8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="191366"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34312@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 04 20:33:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqjzg-000nZ2-4K for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2019 20:33:24 +0100 Original-Received: from localhost ([127.0.0.1]:48131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqjzf-0002BM-0m for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2019 14:33:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqjTR-0007SR-OS for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 14:00:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqjTP-0008LG-JP for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 14:00:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60443) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqjTO-0008K1-Md for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 14:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqjTO-0005Dd-Gz for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 14:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jaros=C5=82aw_?= =?UTF-8?Q?Rzesz=C3=B3tko?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Feb 2019 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34312 X-GNU-PR-Package: emacs Original-Received: via spool by 34312-submit@debbugs.gnu.org id=B34312.154930676819991 (code B ref 34312); Mon, 04 Feb 2019 19:00:02 +0000 Original-Received: (at 34312) by debbugs.gnu.org; 4 Feb 2019 18:59:28 +0000 Original-Received: from localhost ([127.0.0.1]:59724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqjSp-0005CN-LX for submit@debbugs.gnu.org; Mon, 04 Feb 2019 13:59:27 -0500 Original-Received: from mail-it1-f170.google.com ([209.85.166.170]:50778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqjSn-0005CA-LB for 34312@debbugs.gnu.org; Mon, 04 Feb 2019 13:59:26 -0500 Original-Received: by mail-it1-f170.google.com with SMTP id z7so2412014iti.0 for <34312@debbugs.gnu.org>; Mon, 04 Feb 2019 10:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FKUhxPhw3JBMe29mo1Iq3KhC9BK4HgcZom2BdU4xL/M=; b=dhIBJ8DWtMaLIgGjF/bwjq/j9pfgiCIUc/CutpUrqDCG+sIk/CtACXqVCPANbRvbXR OIe3u8wSsJJBS7Sn/DOelYCXdbpTOlzKHMewBEUO98WbXJ4OuxICln4mrkrh2c+Lwdsr G9+GLt6wF4xfpQQHndr7gVDz0zusjG6ZpuzqXyIQ1owJJHD5okEgX3nmG0HTvUnEatC3 /zUgYYGpDyy0RxcpLY5gzYlzp37hyAUpGsEDSn7STKAL52djWiDzf3R7kMkUvCfEhwrm 1H5boOyG7IvSQzwJrK0azb+IBqJtsjQNV4x5TuPVlKuvWwFviTPMlLrnh8B7n53k2N/s 98ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FKUhxPhw3JBMe29mo1Iq3KhC9BK4HgcZom2BdU4xL/M=; b=q2n5osUjcYZn7kahVPfjWIKA12SSvFkIAVVRfWAM/C5CzisEEo/6CV098twz3ffIPO iXXFFiuRaZulOPa2yogUgbL+yxk/eGbEgpla0gxeBy0rWG6jnF6dkqhEkECwmR2Et518 8rfiFWfqFzItBblOTyMwor7R97KnSiEwDgmk0J4d4TLTGKre+uOUmW0Ganud/Cjk8UgH AWtXTJa84jb6lKqstqcesm7iEcl3n2XQ++RKueOFYX2KuuNJe46c+iLFSSXEUozCEjRa VTFR3RukUKz4fonIOOmdDVTPHMgUbwxF28cSfCYM4Fzvo656gXmjwB0NIqIVNJoUzdF1 geKg== X-Gm-Message-State: AHQUAua0oTTMfT4UvSUufk/sLAx1cVXcWyEvlIoHWCCxXaUBaDxN4uwR NQi2EhXjIzOVTBc1//NbXogqDRYaI4nSEB4UWWA= X-Google-Smtp-Source: AHgI3IaefaoUWQBbrp/wsJ6quC4gfWvm2O2j+/b6aqWFnwzoK6mdclXl03afsOzbG1vCfhe4RBgqF8JBbtcGpIbBSrI= X-Received: by 2002:a5d:91c7:: with SMTP id k7mr590618ior.31.1549306759790; Mon, 04 Feb 2019 10:59:19 -0800 (PST) In-Reply-To: <83ef8nv818.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155087 Archived-At: --00000000000010d49d05811617f8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 4, 2019 at 5:21 PM Eli Zaretskii wrote: > > From: Jaros=C5=82aw Rzesz=C3=B3tko > > > > 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=C5=82aw Rzesz=C3=B3tko --00000000000010d49d05811617f8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Feb 4, 2019 at 5:21 PM Eli Zarets= kii <eliz@gnu.org> wrote:
> From: Jaros=C5=82aw Rzesz=C3=B3tko
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<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 i= n 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.=C2=A0 Emacs moved point to the top of the buffer only because there was an error.=C2=A0 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 behavio= r to be dependent only on what portion of the buffer is visible on the scre= en 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 inter= nal state of the Emacs C runtime, that is probably not even in any way acce= ssible to the user.

Also, the documentation for sc= roll-error-top-bottom says it causes the point to be moved *instead of* sig= naling 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 mo= ve the point again.

Cheers,
Jaros=C5=82a= w Rzesz=C3=B3tko
--00000000000010d49d05811617f8--