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: Fri, 19 Nov 2021 09:13:53 +0200 Message-ID: <83k0h4wrbi.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> <83o86izyrt.fsf@gnu.org> <83zgq2x95p.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8278"; 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 Fri Nov 19 08:33:35 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 1mnyOs-0001uA-V1 for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Nov 2021 08:33:35 +0100 Original-Received: from localhost ([::1]:49128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnyOr-0001XA-HO for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Nov 2021 02:33:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mny5r-0006z4-Fc for emacs-devel@gnu.org; Fri, 19 Nov 2021 02:14:01 -0500 Original-Received: from [2001:470:142:3::e] (port=52490 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 1mny5q-00041H-Pj; Fri, 19 Nov 2021 02:13:54 -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=3zvyC0SB5SfCuddn+zfROApxQKhyTX16Ut2uEijzdNU=; b=buTdVk50beA6 uyK8/cuzV1EJkbYZZ1UJlE9II2XYQZaLHtgNoS0Sx6UM/uAwUEWEWcmVFfGoZAHHoRGfE70qQabWj PmLz/eOiYcP7OOdp6SfYM+jBUKRMRmljLIs9aWkQnigW0Bs+nVI2ZWST9neqYUu7lweEwV6+3uYjl paGO4p2hG4SdmlKso/935aQKIexUj3bjdbi3xCMvR3YG3hFeZiTK2toNIhmmbXkFnm8hEy5SoM+u7 kyrxStgOhY0kC3xTs1GCLn//Yp3h6y9k50W0NpuvJbK9kZuGnFnODtoETyn/1Pl5BUBS7kazosod3 34++YeAHPvW15UQHHr2Uhg==; Original-Received: from [87.69.77.57] (port=1307 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 1mny5p-00067f-FY; Fri, 19 Nov 2021 02:13:54 -0500 In-Reply-To: (message from Stefan Monnier on Thu, 18 Nov 2021 22:17:41 -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:279722 Archived-At: > From: Stefan Monnier > Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org > Date: Thu, 18 Nov 2021 22:17:41 -0500 > > > If you want to limit it only to those cases, then perhaps the answer > > is yes, but the problem with those functions is that they try to > > handle many use cases that are not completely described anywhere, so > > testing whether a particular change could break any of them is nigh > > impossible in practice. And the code does work for the use cases for > > which it was written. Which is why I suggested a completely new > > command for the purpose under discussion. > > I must be missing something: in the test case posted here, AFAICT we > just have a call to `previous-line` which doesn't involve any tall > screen line, yet the result is still that vscroll is reset. The current code is not prepared to deal with test cases like that one. The current Emacs code never sets vscroll unless we are moving through a tall line, so resetting vscroll as part of previous-line is a no-op when there's no tall lines in sight, and is not doing any harm. The test case was produced by a feature not yet in Emacs, and so I'm saying that such a feature needs its own variant of previous-line.