emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking buffer positions across time, without markers (was Re: PL s


From: João Távora
Subject: Re: Tracking buffer positions across time, without markers (was Re: PL support)
Date: Sat, 9 May 2020 22:38:42 +0100

On Sat, May 9, 2020 at 8:47 PM Clément Pit-Claudel <address@hidden> 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 buffer, which now contains "static int foo ()".  If I apply the highlighting as-is, 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ão




reply via email to

[Prev in Thread] Current Thread [Next in Thread]