From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61726: [PATCH] Eglot: Support positionEncoding capability Date: Fri, 24 Feb 2023 13:45:23 +0000 Message-ID: References: <87a614g628.fsf@gmail.com> <83cz60r7hu.fsf@gnu.org> <875ybsfvtj.fsf@gmail.com> <831qmgr17p.fsf@gnu.org> <87wn48ecdz.fsf@gmail.com> <83v8jspgnr.fsf@gnu.org> <87lekodxja.fsf@gmail.com> <83a614p4sh.fsf@gnu.org> <87cz60dus9.fsf@gmail.com> <835ybrpnqj.fsf@gnu.org> <87y1oncz09.fsf@gmail.com> <83r0ufo3uc.fsf@gnu.org> <87356vbf0b.fsf@gmail.com> <83pm9znw0i.fsf@gnu.org> <87lekn9ss3.fsf@gmail.com> <83h6vbntqd.fsf@gnu.org> <878rgn9r6u.fsf@gmail.com> <83edqfnq5u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8795"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61726@debbugs.gnu.org, Augusto Stoffel To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 24 14:44:38 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pVYNK-00027f-Cj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Feb 2023 14:44:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVYMl-0002CB-G4; Fri, 24 Feb 2023 08:44:03 -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 1pVYMk-0002Bk-Cj for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 08:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVYMk-0006NW-4P for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 08:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVYMk-0006JF-0A for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 08:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2023 13:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61726 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61726-submit@debbugs.gnu.org id=B61726.167724622824218 (code B ref 61726); Fri, 24 Feb 2023 13:44:01 +0000 Original-Received: (at 61726) by debbugs.gnu.org; 24 Feb 2023 13:43:48 +0000 Original-Received: from localhost ([127.0.0.1]:36322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYMW-0006IX-Gt for submit@debbugs.gnu.org; Fri, 24 Feb 2023 08:43:48 -0500 Original-Received: from mail-oi1-f181.google.com ([209.85.167.181]:37811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYMU-0006I8-7F for 61726@debbugs.gnu.org; Fri, 24 Feb 2023 08:43:46 -0500 Original-Received: by mail-oi1-f181.google.com with SMTP id be35so15891031oib.4 for <61726@debbugs.gnu.org>; Fri, 24 Feb 2023 05:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677246220; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Bfkgbc31b3Aj9WP/+PbrlhMC2xBWimPRc+VsW3XNKv4=; b=CUBEpY3SsEiqDTYMZ4Vvyu+d2PBZALUeXRcynlglSMXegNv/NpN1E5npjv8UW35+lR 1WvvQcidJ7o1F6HsYiQQeua+DP8rrDlvaNR3mNFj0/oRxrmzjICwRGFPeRUstlzTqyOi qslvjMt+0Gyghi8D9Mwh1KURI1qbNb2YDapfImANms8Ty05BrS9F1dBsYSnifAj3Iqa6 P7usaWHZbqy0BX/NNRsjciwvhQCvIw4ue0sWx5/VJ8y8by6EpLPig1iFXtv8adGIeD7j Q8a38xp+bhaysGvVJqX0arjWrknGdvovjr0To5fAco1Jp4UWj8FAJod+hmv8jen1KD0I LVuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677246220; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bfkgbc31b3Aj9WP/+PbrlhMC2xBWimPRc+VsW3XNKv4=; b=JQ+dge6J6HZQD0rcFbw9Gp6cSpFDEFbRbELz/dU69dZ0fsS0hBRe3GCdoXpmpbVsLf Vk51mRVMX8uioX4T3LjvY2Th9dRRYYLnBhpQmxR7NUimXSA1e7EAWAq/1avEFuell9dS ndBJh/lobKCSj0D0wmyVB+ELqOoTp+7ZgLIS5bZAZTjZNdkiLQorYTGfgb+PDXvlm+1Q rOaeIoBYm92sSZEI50MK1Jb/jQ2ujJW6owOymCl/zaqOp5fJYMbAYJxsIFOmIc9lQuLk kNY6VDLU0Y+9cIRuqFSJxAdF7LhwB2MaGAApHQc0YIIGP2KWQYmTT74XwIg0WHLkHYLd ekyw== X-Gm-Message-State: AO0yUKUafT+urv4OSotPsoU1hIaPJ+r/D/X9vO1F/ckgBx8Crh7HVA2O SWO53jvA8fPf+85Dc9FDLs2anra/SEFW7iW8KvE= X-Google-Smtp-Source: AK7set+FwZkD3Rm2AYUT2GxBZsjl9lw3ECpY64ycNG8t/tbDwPjjWuJBKColjS9dt4sxvuBiZjXVIcgQKxo1UmstsLk= X-Received: by 2002:a54:4193:0:b0:37d:6c5a:15bc with SMTP id 19-20020a544193000000b0037d6c5a15bcmr1052291oiy.8.1677246220566; Fri, 24 Feb 2023 05:43:40 -0800 (PST) In-Reply-To: <83edqfnq5u.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256595 Archived-At: On Fri, Feb 24, 2023 at 1:34 PM Eli Zaretskii wrote: > > > From: Augusto Stoffel > > Cc: joaotavora@gmail.com, 61726@debbugs.gnu.org > > Date: Fri, 24 Feb 2023 13:35:37 +0100 > > > > On Fri, 24 Feb 2023 at 14:16, Eli Zaretskii wrote: > > > > > You assume that the characters that aren't encodable in UTF-8 somehow > > > invalidate the results produced by the LSP? But that is not > > > necessarily true, it depends on the context. IOW, this is not the > > > problem eglot.el should solve, and I'm not sure that signaling an > > > error is the correct reaction to this situation. It is basically the > > > problem of the user and/or the major mode. Eglot should do its best > > > to cope, and leave the rest to the user. > > > > You can't even send or receive a message through the JSONRPC channel if > > it's not valid UTF-8 > That's because we _decided_ to behave like that. A decision that is > not carved in stone. At least or LSP, it seems it must be UTF-8: https://microsoft.github.io/language-server-protocol/specifications/lsp/3= .17/specification/#contentPart "... utf-8, which is the only encoding supported right now. If a server or client receives a header with a different encoding than utf-8 it should respond with an error." No problem with making jsonrpc.el support more encodings, but for LSP it must be UTF-8. I don't see how this is relevant to the code-point counting problem here, though. Jo=C3=A3o