[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61726: [PATCH] Eglot: Support positionEncoding capability
From: |
Eli Zaretskii |
Subject: |
bug#61726: [PATCH] Eglot: Support positionEncoding capability |
Date: |
Sun, 26 Feb 2023 17:37:42 +0200 |
> From: João Távora <joaotavora@gmail.com>
> Cc: arstoffel@gmail.com, 61726@debbugs.gnu.org
> Date: Sun, 26 Feb 2023 15:15:57 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
>
> >> But as I said this is just a nit.
> >
> > I made one more fix.
>
> FTR, I think it's way worse now. The function variable has no clear
> protocol: it's very odd to state its return type as number of code units
> _or_ bytes _or_ code points. A good docstring for such a variable notes
> that, for any buffer position, a plugged-in function must return the
> same _type_ but may return a different _value_ to match the
> unit-counting strategy being used by the LSP server.
It cannot return the same value,. it must return a value in the same
units as its opposite. The doc string says:
This is the inverse of `eglot-move-to-linepos-function' (which see).
It is a function of no arguments returning the number of code units
or bytes or codepoints corresponding to the current position of point,
relative to line beginning, as expected by the function that is the
value of `eglot-move-to-linepos-function'.")
Note the last sentence.
> I haven't reverted to avoid a commit war, and because I'm a bit weary of
> this bug. I leave a patch for consideration and for the record, feel
> free to ignore it.
It's your package, so feel free to make any changes you like.
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, (continued)
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/25
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Augusto Stoffel, 2023/02/25
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability,
Eli Zaretskii <=
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/27
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/26
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Augusto Stoffel, 2023/02/24
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/24
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Augusto Stoffel, 2023/02/24
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/24
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/24
- bug#61726: [PATCH] Eglot: Support positionEncoding capability, Eli Zaretskii, 2023/02/24
bug#61726: [PATCH] Eglot: Support positionEncoding capability, João Távora, 2023/02/23