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: Pixel scrolling support Date: Fri, 26 Nov 2021 14:42:14 +0200 Message-ID: <83lf1b2imx.fsf@gnu.org> References: <87a6hrzrcv.fsf.ref@yahoo.com> <87a6hrzrcv.fsf@yahoo.com> <87v90fhayx.fsf@yahoo.com> <835ysf4dyr.fsf@gnu.org> <871r33h0th.fsf@yahoo.com> <8335nj4d53.fsf@gnu.org> <87sfvjfli2.fsf@yahoo.com> <83y25b2u2x.fsf@gnu.org> <87k0gvfeoa.fsf@yahoo.com> <83sfvj2m51.fsf@gnu.org> <87bl27f8pp.fsf@yahoo.com> <83o8672kl5.fsf@gnu.org> <87y25bdsp9.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 26 13:46:23 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 1mqacR-0007OS-1w for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 13:46:23 +0100 Original-Received: from localhost ([::1]:48676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqacP-0004K1-OS for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 07:46:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqaYU-00013D-BA for emacs-devel@gnu.org; Fri, 26 Nov 2021 07:42:18 -0500 Original-Received: from [2001:470:142:3::e] (port=45232 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 1mqaYS-0007Zl-QY; Fri, 26 Nov 2021 07:42:18 -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=fcY8AOaj0KFsaSKhFwGtDp5di0tr03dUw1I/9y3tVHs=; b=SoUONYdleceC ahyy48j85jQtEXuiOWRgj0gjc7Ikb+g+i1WHK+/dh7C72o2mLUr+v0E+ab+pn69jLG83zOUzVslVk wUK7aR6lp0kc2AXDlxY/2Nn9/OrFAAezY+yUDqFevy+A9Fuo67sgNWogff9g7mv0/+1w/TUdHM+/p Gn2G7tnbSz5CL7DS+TX4xxMrZoHuKUk1M5JYbtK2qcyLyQJLcndkn6e876FXS6T3nfJF1ysojXDMc E5CKHLNRrcMCjlb2SPpkcDwBuHEgS174iqnUt4kcMN5fusSLcMViK2BgebOfEWSBmTr4tmetR8hci CCz2zinnHJqpa4cNzHsYwA==; Original-Received: from [87.69.77.57] (port=2084 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 1mqaYN-00089f-Ag; Fri, 26 Nov 2021 07:42:15 -0500 In-Reply-To: <87y25bdsp9.fsf@yahoo.com> (message from Po Lu on Fri, 26 Nov 2021 20:09:22 +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:280234 Archived-At: > From: Po Lu > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Fri, 26 Nov 2021 20:09:22 +0800 > > Eli Zaretskii writes: > > >> I use `posn-at-x-y' to determine the position closest to the first line > >> to be displayed on screen after the window is vscrolled by DELTA. > > > How do you know which line is "the first line to be displayed on > > screen after the window is vscrolled by DELTA"? That's the bit I'm > > missing, I think. > > Basically, the first line that's displayed in the window (which might > not be the line at window start if the window is vscrolled). If that position is outside the window, you should be able to use window-text-pixel-size to get the information. > > What is "the delta by which the window is being scrolled"? Is that > > the window's vscroll or is that something else? > > It's the pixel delta by which the window will be scrolled vertically. Sorry, I don't understand how this is relevant pos-visible-in-window-p can tell you the pixel coordinates of EOB if it is inside the window. If the EOB is inside the window, you should not scroll at all and return immediately, so as to avoid the annoying error. > > Of course, it does. It might not be exposed to Lisp (I didn't look > > closely enough), but it is certainly supported on the C level. > > Hmm, it would be great to expose that to Lisp, as right now > `set-window-hscroll' only accepts columns and not pixels. Patches welcome.