From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Redisplay resets vscroll when window start changes Date: Thu, 18 Nov 2021 22:17:41 -0500 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 19 04:19:49 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 1mnuRJ-00073r-2a for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Nov 2021 04:19:49 +0100 Original-Received: from localhost ([::1]:47074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnuRH-00007l-4J for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Nov 2021 22:19:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnuPd-0007Dj-Sk for emacs-devel@gnu.org; Thu, 18 Nov 2021 22:18:07 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnuPa-0005pz-TW; Thu, 18 Nov 2021 22:18:05 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A0D2180303; Thu, 18 Nov 2021 22:17:54 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D47718063A; Thu, 18 Nov 2021 22:17:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1637291871; bh=93071zqTtp5/dFYQmlmbUzQCBKLNsqGAHmEhIP4iprM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gkZh/HKEEwHU2uLspdNmAX6255muHKheRzGsS0NghLnmMESeyrOqML4GwKqPTIBya EwMnSelI6a9O59lvw9ohj41xFAjg6bDi6n7/fpJ14tRbYsRHVOWDrcqXiP7LnM9LTP tSg91wqJvIO8BX+oOHhtdL04ajwdlDapT6YDcFYam1xNJVNFO/WVN2ADbczDXn/jSM qTRyTmVYxH9syz7LvwaUaoReUxTCLlU4yyYR0v8MzBu/yV4WnibUfMlm4c6uOlyzm9 CZY1AnxKnek2E4tsJLzm1XDjJ9C/LrUZvrzM0J8nX+n8HOcbZaU8VomonIVg2XlWj8 pgK0h44Kest9Q== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9E60D120842; Thu, 18 Nov 2021 22:17:51 -0500 (EST) In-Reply-To: <83zgq2x95p.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Nov 2021 08:36:18 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:279698 Archived-At: >> >> 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. >> >> The question can be rephrased as: could `line-move` only reset vscroll >> in the case where we're scrolling through a very tall image? > > It currently handles the case of a tall screen line, which could be > due to an image, an xwidget, or simply very large font. > > 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. Stefan