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: Mon, 19 Aug 2024 14:06:52 +0300 Message-ID: <86msl8ydo3.fsf@gnu.org> References: <87zfq2hg4n.fsf@stebalien.com> <86ikwq1z92.fsf@gnu.org> <87v80qha04.fsf@stebalien.com> <86cymy15n2.fsf@gnu.org> <877cd59t76.fsf@stebalien.com> <86jzh4zc2w.fsf@gnu.org> <877ccd3f56.fsf@stebalien.com> <86wmkdy9mx.fsf@gnu.org> <871q2l3c9h.fsf@stebalien.com> <86r0aly7s5.fsf@gnu.org> <871q2l5vcj.fsf@stebalien.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18000"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 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 Mon Aug 19 13:07:41 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 1sg0Ef-0004Yl-3C for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Aug 2024 13:07:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sg0EM-0000MT-JZ; Mon, 19 Aug 2024 07:07:22 -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 1sg0EK-0000MI-SV for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 07:07:20 -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 1sg0EK-0003Uo-Iz for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 07:07:20 -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=sRzOfRAXm+Axfbmwi8J9UY8SEgplZX6TyUuL0yRCwU4=; b=DV82p7kT/BNsAybQMbCh7dauVyR0FZQzOzScVYLpdboOx9tBwjeAgDwoQQKh17ELW2GYQLRyqHta1l6ZobRj83qrMq5KqWw5GOO0sxznCiDj8PdWQtTP8bNsV2wB92On3CD/oIv8WGc3Vnuxsn+KmHV37N+RKpA6LaKbexcgEtVIdeyn3GPcEBYU9fe5CpytkuETpO0DENPUDxnt/joIRbCPgWE8v71p89HuSH7IN8bUj0CP8ik1eP6Da6u2YVrA1tiHecgta5sluirHH9tcZ/WWTFyzcwnARMha0r1X/uLt+njbq4nmjvf9sbLz5D8MRT2egRP1AdMKETMwVFvWBQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sg0F0-0000Fb-32 for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 07:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Aug 2024 11:08:02 +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.1724065665928 (code B ref 72323); Mon, 19 Aug 2024 11:08:02 +0000 Original-Received: (at 72323) by debbugs.gnu.org; 19 Aug 2024 11:07:45 +0000 Original-Received: from localhost ([127.0.0.1]:57749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sg0Ej-0000Et-CZ for submit@debbugs.gnu.org; Mon, 19 Aug 2024 07:07:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sg0Eh-0000Ed-16 for 72323@debbugs.gnu.org; Mon, 19 Aug 2024 07:07:44 -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 1sg0Dv-0003QH-5m; Mon, 19 Aug 2024 07:06:55 -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=sRzOfRAXm+Axfbmwi8J9UY8SEgplZX6TyUuL0yRCwU4=; b=bilhHClOkxYb XudH2LuTXNtaoNXrf2bnDTjJb/kWqZ1ZRaNtSfB6bsAee3pDquC78rZlnU0a0+7ZlTy3XWTYOmYdF /OJgtIOReDWY54BgFfPUH8pE0Qf6p9mIHhd7c3jwU+bFdL/SCfqYG1o6zxGrWVV02A7uJPt88VrTt INFrM+VUfRowEJ8CK92v5BBwuZ8eiozFberUM2++IQp4E6aSrW8LAxGntzKutLLF5Ko5sO4muOxtq DzKxSD8GEEKeGy9AXwYUq+urapc39TkIP5PJx2zyOvAZmX5EcOE9Sgey/I0BffURT+jGnh0IifKgF XvbRQFGjalEitQ4mHIAo/A==; In-Reply-To: <871q2l5vcj.fsf@stebalien.com> (message from Steven Allen on Sun, 18 Aug 2024 15:17:48 -0700) 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:290381 Archived-At: > From: Steven Allen > Cc: luangruo@yahoo.com, 72323@debbugs.gnu.org, storm@cua.dk > Date: Sun, 18 Aug 2024 15:17:48 -0700 > > Eli Zaretskii writes: > > >> > I disagree. When point moves to another screen line without moving > >> > window-start, vscroll may or may not be valid. Whether it is depends > >> > on the details of what is on display. > >> > >> Can you give me an example example where moving point invalidates > >> vscroll (except when point would move partially or fully off screen)? > > > > Why isn't the one example I gave enough? > > > > The code in question doesn't know whether this is or isn't the case, > > at least not in all cases and not without a lot of tedious layout > > calculations. Whether the current line will be fully visible is only > > known after the window is redisplayed. At which time we also check > > that we didn't enter the scroll margins and other conditions that > > require to scroll the window. Keeping the vscroll would make all this > > much more complicated, so we play it safe. > > I just wanted to confirm that the issue is specifically about the being > fully visible and not something else I'm missing. If that's the case, > I'll see if I can hack something up for my own use and, if usable, see > if it's possible to integrate into pixel-scroll-precision-mode. But > it'll have to be an advice as line-move is called all over the place. That was the first thing on my mind. It might be the only one, but I cannot guarantee that: the Emacs display and display-related capabilities are almost infinite in the features and combinations of features they are expected to support; I'm hacking this code for the last 20 years, and still learn new aspects every now and then. > It really sounds like you just don't want to mess with this function > which is a reasonable stance as the maintainer. That's right: I spent so many hours debugging and fixing it in various tricky situations that I very much dislike the idea of removing one of its main assumptions which was there since before my time. Please keep in mind that it isn't just this function that resets vscroll, the same is done under certain conditions by the display code in C as well. So if we are going to change that, we may need to make corresponding changes there also. > But it was really hard to tell if there was something I was > fundamentally misunderstanding or if you were just being cautious > and not wanting to touch a complex piece of machinery if it's > working "well enough". It's mainly the latter. But I have a lot of gray hair to back that up.