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: move_it_vertically_backward question Date: Thu, 16 Dec 2021 10:29:30 +0200 Message-ID: <83tuf9gdg5.fsf@gnu.org> References: <87lf0pw78r.fsf.ref@yahoo.com> <87lf0pw78r.fsf@yahoo.com> <837dc8mue3.fsf@gnu.org> <874k7cuhv4.fsf@yahoo.com> <83lf0nl56t.fsf@gnu.org> <875yrrtiwj.fsf@yahoo.com> <837dc7l2pa.fsf@gnu.org> <87ilvqty24.fsf@yahoo.com> <8335muj8zk.fsf@gnu.org> <87h7bang3d.fsf@yahoo.com> <83mtl1j527.fsf@gnu.org> <87zgp1mldh.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23883"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 16 09:31:32 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 1mxmAm-00062A-BT for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Dec 2021 09:31:32 +0100 Original-Received: from localhost ([::1]:60124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxmAl-0002fM-3v for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Dec 2021 03:31:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxm95-0001OD-J8 for emacs-devel@gnu.org; Thu, 16 Dec 2021 03:29:47 -0500 Original-Received: from [2001:470:142:3::e] (port=54154 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 1mxm95-0006GZ-9T; Thu, 16 Dec 2021 03:29:47 -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=B+/Bog+idHeyGMzvjN7Ri5PC11n0URrG7Sm/M8BvibU=; b=F+FW7xLO8hNY kijMl8mODks+IaigS6QGDkHN29vXt/G5LxRsHZ3EZg5p2TADPbW80IaCoUHfJHDzDpbUF3QdkH0xU nTRhRtiR4vntYZgzZa5D4BxZHSUvNWWosTQG4cbMkCLa+bYevHYexJXv14u4rMmaM8sYskDC4yGLd hJWSG8CPTWS4c1xCaZtkCOe0MUoLWb2dHo6vgASZFzVgZLgNHfWh10pLTHZGelR3/etoz1NzAQcLV 16siphg0FgDT3rdq1FNiJFbf7cPhzyIkUQ8ibpoeg5sAPqyFIDojJDD2POUb0iWRTT5f94qnEbRUi ULat5JIzx+EFdWiGye01xw==; Original-Received: from [87.69.77.57] (port=4527 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 1mxm95-00011l-4E; Thu, 16 Dec 2021 03:29:47 -0500 In-Reply-To: <87zgp1mldh.fsf@yahoo.com> (message from Po Lu on Thu, 16 Dec 2021 08:41:46 +0800) 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:282135 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Thu, 16 Dec 2021 08:41:46 +0800 > > Eli Zaretskii writes: > > > We have code in the display engine that does this in several places. > > For example, look at what we do when we recenter the window in > > redisplay_window. We could factor that code out of there, put it in a > > separate function, and teach window-text-pixel-size to find the FROM > > position using that new function. Then the value of the TO argument > > for window-text-pixel-size is of course well known, and you could run > > the rest of the function to provide you with the pixel dimensions of > > the text in-between. > > > > Would that fit the bill? > > I think it would, with the addition of a way to specify "the end of the > visual line preceeding window start" as the TO argument. That is > because window start could be inside a screen line, causing its height > to be taken into account when `window-text-pixel-size' calculates > height. I don't object to supporting such specifications for TO, but why do you need that in this case? why not use window-start as TO? Or maybe I misunderstand what you mean by "window start could be inside a screen line". Do you mean the window start is not at the leftmost character/display element shown on that screen line? When does that happen?