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: Eglot "inlay hints" landed Date: Thu, 23 Feb 2023 20:01:50 +0200 Message-ID: <83edqgp8fl.fsf@gnu.org> References: <83edqqaf8c.fsf@gnu.org> <2B284D77-97DF-4B3E-89FB-13F0CA93D240@gmail.com> <87356xv65z.fsf_-_@gmail.com> <83fsawriye.fsf@gnu.org> <835ybsr6aa.fsf@gnu.org> <83356wr224.fsf@gnu.org> <87bklktu89.fsf@gmail.com> <83y1oophd0.fsf@gnu.org> <83k008pah3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dalal.chinmay.0101@gmail.com, emacs-devel@gnu.org, dimitri@belopopsky.com, luangruo@yahoo.com To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 23 19:02:57 2023 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 1pVFvk-0005N7-N4 for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Feb 2023 19:02:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVFup-0002J8-Al; Thu, 23 Feb 2023 13:01:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVFuk-0002IQ-Rx for emacs-devel@gnu.org; Thu, 23 Feb 2023 13:01:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVFuk-000398-7D; Thu, 23 Feb 2023 13:01:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=aJEuMX0s/znyg888+3BMY/Nfsy8hc10XfoTkrMaVi1w=; b=A9miakXCerWZImBJC0IL AMw7xShbbNwjcNuS1B/Pqk0fZZc9unzwD+O05fGyDj6f/yKsmWX4Hqb4IlKC4stWrgotXkNnWjzUC i1RX/NpzmudY/iQim3acpYbQYZKP4aKia/IgvxPjbzg3y1D40pHoSLzMLrdYd9dQhNsgW17tsxhcK yKBB+gRl0iLYNkmI0PvFZLntSLB6ufdNvAuw71rlEzdgibzd6wbjoiw2MAkgex4L1rZAAyZdTOY57 lqtbhF3mOraIwhlVHWOqIH69tVzIdpnebDSEDeYFYPX4Rn1sXjDmxsfu+sJm9Enr5DLWvRmR4Koth m1iEgN6FjwqaEw==; Original-Received: from [87.69.77.57] (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 1pVFuj-0005kt-Ms; Thu, 23 Feb 2023 13:01:54 -0500 In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 23 Feb 2023 17:46:08 +0000) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303713 Archived-At: > From: João Távora > Date: Thu, 23 Feb 2023 17:46:08 +0000 > Cc: dalal.chinmay.0101@gmail.com, emacs-devel@gnu.org, dimitri@belopopsky.com, > luangruo@yahoo.com > > > That's no for jit-lock to do. And I don't see how it could be > > relevant to the issue we are discussing. How do you do this now? > > I don't. I was just pointing out that jit-lock by itself doesn't > solve this A -> B dependency, which you seemed to suggest it does when > you wrote: > > > > If there's a change in A that affects B, jit-lock will call > > > fontification-functions in both A and B, each one when it's about to > > > display the corresponding window. That was written under the assumption that the overlays in B are already updated. Then redisplay will know it must redraw B. > > window-scroll-functions cannot promise that, since > > they are only called "when the window is scrolled", and there's more > > to that condition than meets the eye, believe me. > > I believe you. But as far as I can tell so far, it's the least > imperfect of the methods, and I haven't seen demonstrations of > problems so far, only your speculation of hypothetical problems. I actually gave you a recipe for demonstrating the problems I have in mind: scroll the window under pixel-scroll-precision-mode. AFAIK, we don't call window-scroll-functions in that case. Another situation where we don't call window-scroll-functions is when the user types into the buffer. Yet another situation is when you type "C-x 1" to delete all the other windows on the frame, leaving the current window that now shows more stuff than before. > I'd love to switch over to the jit-lock implementation as it has > potential to be much neater. But I can't seem to get it to not > over-request stuff. I attach the patch I've been trying, and it's > clearly got some thinkos when you test it. It doesn't help that > `window-start` and `window-end` aren't -- apparently -- reliable > when called from a jit-lock function. Sorry, I don't have time for that ATM, but maybe Stefan will want to comment.