From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#72323: 31.0.50; line-move unconditionally resets vscroll to 0 Date: Sat, 27 Jul 2024 21:11:21 +0300 Message-ID: <86ikwq1z92.fsf@gnu.org> References: <87zfq2hg4n.fsf@stebalien.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40882"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72323@debbugs.gnu.org, storm@cua.dk To: Steven Allen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 27 20:14:15 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sXlvq-000AVZ-4o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jul 2024 20:14:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXlvk-0005lK-9N; Sat, 27 Jul 2024 14:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXlvT-0005kc-R7 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 14:13:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXlvT-0003jt-I6 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 14:13:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=QGDPmoq2nrH2a5NXRsa3bc72RYgiogGyeOrB/Z5hpoY=; b=W9UtrckeKrNnVlSylpJMlkQrcyPvgruA//GAopcRvyoGwa0vqWVe9nKOulhswAmF5HXVtk3Xq3asFbYwUgqQ+3BKChFnfVKwiEvNo7d4W1gM8o3IHbp7kZRrHmW28WyDhiRSS3/Q9Mk4WxL+jh0yP4jB1TEKbTSlyR0PFLgWyuNibh2U9fXuG9wDli+DanS9xsn/376xG8D2Ex9JS+scCuB0Qd+C8M6gOUKJkNyz2m4ZfClAfjIYN/jcCgymdSeFnfIfJ21m84it0IvLkHLIcc59T67hM1yf5ua4K8mWyoNrqUpWezcLe3cnB5NceQ/Ac4ZhGqSLNB7a5eHeJntigg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXlvd-0002lO-Kt for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 14:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2024 18:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72323 X-GNU-PR-Package: emacs Original-Received: via spool by 72323-submit@debbugs.gnu.org id=B72323.172210403410527 (code B ref 72323); Sat, 27 Jul 2024 18:14:01 +0000 Original-Received: (at 72323) by debbugs.gnu.org; 27 Jul 2024 18:13:54 +0000 Original-Received: from localhost ([127.0.0.1]:42381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXlvW-0002jW-60 for submit@debbugs.gnu.org; Sat, 27 Jul 2024 14:13:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXlvT-0002hp-Qy for 72323@debbugs.gnu.org; Sat, 27 Jul 2024 14:13:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXlt6-0002fH-9I; Sat, 27 Jul 2024 14:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QGDPmoq2nrH2a5NXRsa3bc72RYgiogGyeOrB/Z5hpoY=; b=g5i8FMJMPCM6 TpJjBjFNyiS/xFtULVCBUscHTFY7rnKZ3a+SEJ5lGhbr/c2aOt03bfR3C5wV71fRoLVS1hBEOUjkB K5nu0CFf4F27pPnugg9xka7epsCyuQsroK2bKvCn8y9aabSl6zAoc2wEiMbqCOpOMTHCe9vWUs0U+ xyHbnNJ4tPjbpAYjH/xgodNxNERpHbPqfxDe6PvQzW7RB8Tc+NCSi1AVaKiYl6axbVha2vYbhUzy0 EL68ZOMWqSRfQPQbsschOhu8LEWZPNhMBofm8nlEkey3wk+cxix8Oc/jw5ucD/KfUQxfTqhl9dHkz fqhhKdRvHgHphiUI4IqaMA==; In-Reply-To: <87zfq2hg4n.fsf@stebalien.com> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289439 Archived-At: > Cc: "Kim F. Storm" > Date: Sat, 27 Jul 2024 10:57:44 -0700 > From: Steven Allen via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Fixing home/end (beginning of line, end of line) case seems trivial: > don't call `line-move' in these cases (or have `line-move' short-circuit > when `arg' is 0). However, even after reading all the comments about > scrolling images, I'm still not sure why it's necessary to reset vscroll > to 0. Because otherwise what line-move does cannot be described in sensible terms. If vscroll is not reset, then what would be the reference for such a "line move"? By its very definition, line-move moves N screen lines wrt the line which was its starting point, but with vscroll non-zero that starting point could be anywhere. In addition, when we move to another screen line, the value of vscroll cannot be meaningfully kept, because its meaning is tightly coupled to the screen line where it was applied. In essence, vscroll is a trick to allow display of a tall display element (image, text using a large fonts, etc.) in a window whose height is too small to show all of the display element at once. > After commenting this line out, I can't tell a difference, even > when scrolling images with and without `auto-window-vscroll' and > `try-vscroll'. line-move is not just for scrolling across images, it is also about scrolling across tall text lines and other display elements. In any case, asking for removal of that reset is a non-starter, for the reasons explained above, so it isn't going to happen. The solution for any Lisp program that doesn't want vscroll to be rest is not to call line-move. > I was hoping Kim could shed some light on this. I'd be thrilled to hear from Kim, but I'm as guilty of the code in line-move as he is, so "blame" me if you want.