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.devel Subject: Re: Redisplay resets vscroll when window start changes Date: Wed, 17 Nov 2021 15:40:06 +0200 Message-ID: <83o86izyrt.fsf@gnu.org> References: <87k0h9pp7t.fsf.ref@yahoo.com> <87k0h9pp7t.fsf@yahoo.com> <83r1bhsdsn.fsf@gnu.org> <87tugdnf1x.fsf@yahoo.com> <831r3g2rhe.fsf@gnu.org> <87tugcuuoz.fsf@yahoo.com> <87o86kuuek.fsf@yahoo.com> <83r1bg1ay4.fsf@gnu.org> <87zgq4te32.fsf@yahoo.com> <83mtm41afl.fsf@gnu.org> <875yssufhf.fsf@md5i.com> <87czmztynn.fsf@yahoo.com> <83wnl7zcej.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23296"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 17 14:47:00 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mnLH9-0005ql-Hy for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Nov 2021 14:46:59 +0100 Original-Received: from localhost ([::1]:34552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnLH8-00067F-E2 for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Nov 2021 08:46:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnLAe-0007gH-7Y for emacs-devel@gnu.org; Wed, 17 Nov 2021 08:40:16 -0500 Original-Received: from [2001:470:142:3::e] (port=59634 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnLAd-0005zl-RH; Wed, 17 Nov 2021 08:40:15 -0500 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=v1vaPDKgBukD7ZSRu17S4/av8JMO4ozKsn7lX+ul0qA=; b=GkAXVKTuIgsA njXyw1QVw7UolXgYxo5m106nDDmEaCDYL7owJkNYGDeouRo/R9dQoMGTOMbKu2Ljsn4s7b8JgsVK8 JbiVesEf+SAP3Q39YU5HrsWCkRGA75EJTh+zXLciXma6SiTwy4URi3+2QqbN9N3MzErZwttfWpx0G gFmgRndJI4bs2EusZP7krCzDJIbb8Yv+rCeeGiNYrOUWP7H4fcOOSYKIMrW6OUoRnmimWBuch/QSD 5ocWBaKMeRMOMzWMC3rnOKhCMcPLLBzFZEboTRdti1ZsPDcL27YrPwFEA1HfYUrcDu8NAb5ECixsQ mIE8YUM5J30v7cQhODAR5Q==; Original-Received: from [87.69.77.57] (port=2710 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnLAb-0005Rf-6D; Wed, 17 Nov 2021 08:40:15 -0500 In-Reply-To: (message from Stefan Monnier on Tue, 16 Nov 2021 22:40:35 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279631 Archived-At: > From: Stefan Monnier > Cc: Po Lu , mwd@md5i.com, emacs-devel@gnu.org > Date: Tue, 16 Nov 2021 22:40:35 -0500 > > I'm still not sure how/why line-move should affect vscroll. Because it needs to handle the case of scrolling through a very tall image. When that scrolling shows the last (bottom-most) portion of the image, the next C-n should go to the next screen line, and that means zero out the vscroll. Conversely, when we show only the upper portion of the image, the next C-n should increase vscroll to show its lower portions. > AFAIK while line-move does use some of the redisplay code, in theory at > least its effect should only ever be to move point (i.e. when called > within a `save-excursion` it should end up having no effect at all). If you only move point, but leave vscroll at zero, you will never be able to show the parts of the image that exceed the window's height. > Would there be a way to distinguish the case where line-move can return > a correct result without changing vscroll, from the case where it does > require changing vscroll in order to find its answer? I don't think I understand the question. It might be worthwhile to keep in mind that the display engine (almost) never changes vscroll, so if you want it to show a large object at some position, you must manipulate vscroll from Lisp.