GNU bug report logs - #61726
[PATCH] Eglot: Support positionEncoding capability

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 23 Feb 2023 08:06:01 UTC

Severity: normal

Tags: patch

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61726 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#61726: [PATCH] Eglot: Support positionEncoding capability
Date: Fri, 24 Feb 2023 18:55:18 +0000
On Fri, Feb 24, 2023 at 6:08 PM Augusto Stoffel <arstoffel <at> gmail.com> wrote:
>
> I've attached a minimal functioning version of the patch.  I would
> prefer to merge this and do all possible refinements discussed here at a
> later stage.

This is OK with me.  I think the current patch is OK, modulo some very
minor whitespace and formatting options that I can fix  myself.

> For the 2 new functions I've followed current naming scheme, replacing
> "lsp-abiding" by "bytewise".  We can then get rid of all the suboptimal
> nomenclature (lsp-abiding, column, bytewise) in one go at a later stage.

OK, but not too late though, as these are user-visible-functions, and
I'd like to tag an Eglot version soon.

> I also didn't attempt to make 'eglot-move-to-bytewise-column' and
> 'eglot-bytewise-column' "correct" in the cases where 'json-serialize'
> throws an error.  I think it's clear that Eli and I have different
> definitions "correctness" in this context, but Eli's proposal requires
> substantial further work, including recovering from possible errors
> raising from 'json-serialize'.

If Eli is OK with this provisional UTF-8 impl, then so am I.  How
complicated do you estimate Eli proposal to be in comparison?

> Lastly, I used 'line-beginning-position' naively in the 2 new function
> because there are at least 4 other pre-existing naive uses in eglot.el.
> This refinement deserves a patch of its own, probably using something on
> the lines of
>
>   (defalias eglot--pos-bol (if (fboundp 'pos-bol) 'pos-bol ...))

This is also a good idea.

João




This bug report was last modified 2 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.