From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Tracking buffer positions across time, without markers (was Re: PL support) Date: Sat, 9 May 2020 22:38:42 +0100 Message-ID: References: <6a2c7d18-344e-fefb-63d5-79a99d0532fc@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b8c13a05a53df01b" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="40931"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 23:39:30 2020 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 1jXXBy-000AZV-Mp for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 23:39:30 +0200 Original-Received: from localhost ([::1]:57212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXXBx-0004ga-P5 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 17:39:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXXBP-00044y-Sr for emacs-devel@gnu.org; Sat, 09 May 2020 17:38:55 -0400 Original-Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]:39497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXXBP-0003fk-1W for emacs-devel@gnu.org; Sat, 09 May 2020 17:38:55 -0400 Original-Received: by mail-il1-x12c.google.com with SMTP id r2so4854072ilo.6 for ; Sat, 09 May 2020 14:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zR7Jr6HOS70v7MjW4st4kjnDBl9CSTQ4Kin+cpxQ4Rw=; b=DjEU5uZk+2f2iutvoQiwiv3u5qszpFLCqCXyKhUKyqtj7JD12/DE0sgFOBwurR6qEr +Z6y30nFAeo+fb2F9gcN6tm332Uy42u0Go2buPkkoUfieXWyShql+TwlwWr8krnU+Y/V mTER09ob1Ch2r2sENBUSa72xa0RWDydesSjbtLg4R1iayG02G5x6/VqpJoSDpBJZ81Kx Oxb3dyJpsthqObTfbYLWODmJA86L3vBuA0GOa/pE8VKRhHZ3xkoF8UdwtWcUMZrT/+Ez Ly5hvrgM7k+ajW3Zg1u3qVo6yb8+Get0Ie+NSTca8sRyj4JZUzkqYt/c7V84roH6x8Fu rG7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zR7Jr6HOS70v7MjW4st4kjnDBl9CSTQ4Kin+cpxQ4Rw=; b=WVq7Qe22oeURZ43JMx1BJLDxrUo8t+Z1wpRAU6p9bePYfvcd1TWK5tQ7iqzQQz/pAi z/dFMt5+mQDjbDK0245ZOCxNqAO7UUIjUhR+cDG3RrCYK0Os1ib+e4eA7lBoZguqDaGR rNz/KszVlDPAgO3i29Zf9vX6EVxftmbXRRTVIpc/5/wN9D7j10gorq8Ll0VSvPRz/u5l q6ESuUTNRgC9UIlMvj6J6LCvV2UzwouOcrXV/uxNNA6tScvQkqMRh/f7y8i4Ol6SzSOc K1pNZlochJq3ty5gCEPTWaWClsS8Y6tfG9I0SFFZVasa5HvNcSThcvQvNXAzq/YZ8ZIV +V3w== X-Gm-Message-State: AGi0Pub2LbQVS6tZ2q0RKBddQCLoLJ8qyeU4l91RY5A4SiLc8pnraps3 uyGVxIgoBnuxvteqx5l8IxHpLo4bDIFqBWgH+xc= X-Google-Smtp-Source: APiQypIeC/+cq4GJhHa9PbCJuFRvcJjR7HwfpfuLinx8/dsuAsxxCZIt5YLprehsKBKEBRFVNu7KQKrcvIT9KX8NWd4= X-Received: by 2002:a92:4a11:: with SMTP id m17mr9136480ilf.125.1589060333779; Sat, 09 May 2020 14:38:53 -0700 (PDT) In-Reply-To: <6a2c7d18-344e-fefb-63d5-79a99d0532fc@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::12c; envelope-from=joaotavora@gmail.com; helo=mail-il1-x12c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:249582 Archived-At: --000000000000b8c13a05a53df01b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 9, 2020 at 8:47 PM Cl=C3=A9ment Pit-Claudel wrote: > Can you clarify what you mean by 'a solved problem'? I meant it in the context of LSP. > One long-standing issue that I've had with Emacs is that I don't know of = a > way to track buffer positions without adding markers. Here's a concrete > example: > > I start with a buffer that contains "int foo ()", and send that to a > subprocess (say a syntax highlighter, for example). It returns [0:3:type= ; > 4:7:name]. In the meantime, the user has inserted more text in the buffe= r, > which now contains "static int foo ()". If I apply the highlighting as-i= s, > it will be all wrong! > Some idle time after you type, Eglot will inform the LSP server that things have changed, and it will reply with more stuff to highlight. This is how I interpret this. It's the way it works with, say syntax errors, which are already supported. I've NOT looked at the spec. Did this help? Jo=C3=A3o --000000000000b8c13a05a53df01b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, May 9, 2020 at 8:47 PM Cl=C3=A9ment Pit-Claudel <cpitclaudel@gmail.com> wrote:
<= /div>
Can you clarify what you mean by 'a solved problem'?=C2=A0

I meant it in the context of LSP.=C2=A0
=
=C2=A0
One long= -standing issue that I've had with Emacs is that I don't know of a = way to track buffer positions without adding markers.=C2=A0 Here's a co= ncrete example:

I start with a buffer that contains "int foo ()", and send that t= o a subprocess (say a syntax highlighter, for example).=C2=A0 It returns [0= :3:type; 4:7:name].=C2=A0 In the meantime, the user has inserted more text = in the buffer, which now contains "static int foo ()".=C2=A0 If I= apply the highlighting as-is, it will be all wrong!
<= br>
Some idle time after you type, Eglot will inform the LSP serv= er
that things have changed, and it will reply with more stu= ff
to highlight.=C2=A0

This is how = I interpret this.=C2=A0 It's the way it works with, say syntax
errors, which are already supported.=C2=A0 I've NOT looked at the spe= c.

Did this help?

Jo=C3= =A3o



--000000000000b8c13a05a53df01b--