From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#61726: [PATCH] Eglot: Support positionEncoding capability Date: Thu, 23 Feb 2023 20:52:06 +0100 Message-ID: <87cz60dus9.fsf@gmail.com> 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> 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="33145"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61726@debbugs.gnu.org, Eli Zaretskii To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 23 20:53:22 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 1pVHeb-0008Qd-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Feb 2023 20:53:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVHeL-0001TQ-Cc; Thu, 23 Feb 2023 14:53:05 -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 1pVHeI-0001TD-VM for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:53: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 1pVHeI-0002zA-MX for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVHeI-0001Wz-4h for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 19:53:02 +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.16771819385819 (code B ref 61726); Thu, 23 Feb 2023 19:53:02 +0000 Original-Received: (at 61726) by debbugs.gnu.org; 23 Feb 2023 19:52:18 +0000 Original-Received: from localhost ([127.0.0.1]:35402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVHdZ-0001Vm-KG for submit@debbugs.gnu.org; Thu, 23 Feb 2023 14:52:17 -0500 Original-Received: from mail-ed1-f51.google.com ([209.85.208.51]:46050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVHdX-0001VY-5m for 61726@debbugs.gnu.org; Thu, 23 Feb 2023 14:52:15 -0500 Original-Received: by mail-ed1-f51.google.com with SMTP id eg37so42594749edb.12 for <61726@debbugs.gnu.org>; Thu, 23 Feb 2023 11:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=T49RBVzl0EjmM/Tt7UiCNrK4cjnT/UT7nHK117UYqM4=; b=jm2zQAL/UaFDkNaIVbmQ/4EHD+y5m3mrTrLMWMfpjKdypmFRcnb1Jk+6HVBjOcR2TJ FeVs1Fx0T1tf4IWZV1AMLl3MKr7y4uewCa1O6kuBYWEUbXdhpd1W0kz8M13YeZWeWPrQ xCYnFitRyw27tUUTALaVnTQgrWhdb/l694EEYUAir4x3sMNK9gvhEwPM5TlYo7I2FYVZ YYkecFsO/bDisVYmzJvd9QRYuRit3YkTUIQKAfr7qKrcQwkXID3uJYCgKmcebLj3TtUJ ZzCfQQf0KihjNpdOldSKMl+BMZ3EAmnn0Fo7ObZlJJpKVJbhhb2YGMPYA/xlGk2+v5B1 0ffg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T49RBVzl0EjmM/Tt7UiCNrK4cjnT/UT7nHK117UYqM4=; b=PgZOgW+SY0cPXq69+JAhL67ZHKiVu1SuLWeKknJv50zF1IVni2cfavw2bARNreq66/ cb85J/e26717Oxtd7aQV7a94auOxARJ3Oyas6ao8X6F0J/f3e8n0o6eT2b0zIbFP1IMB 9UWUv2/dsKtuKIkGEsMufBchhTlxOWifdS2zYigTu6qazd3ptDUlqohR1VowPC8rjQC7 0n6+LidDf90+Gjr6SpT2SwkMzYaA+cyb9Dfo4uj5N+XKgc3P5erox/edExmunRgAq8sX j5ElZC33kHZmE2uCR7nFK0ArAOumIqOMjCeCkqx8Hxx0zUYLLox71Gt2i+n+NoWiObA+ TXlg== X-Gm-Message-State: AO0yUKWMGOEq+HHejQsnSBLHOJGryH1pyZEdSMPr+lX4aif906kHpDBy OktYzTa5975GmWwdrt7DNH+ATJcSaIU= X-Google-Smtp-Source: AK7set/WcBv6crUppkxa3gl/6NgA7ZCGUxjg6FT/BinxvXLyTUrRO+wPt6x8LCBbdi8cjYDTYxjOHA== X-Received: by 2002:a17:906:9bec:b0:8b2:fa6d:45e6 with SMTP id de44-20020a1709069bec00b008b2fa6d45e6mr22056531ejc.2.1677181928872; Thu, 23 Feb 2023 11:52:08 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::6fd0]) by smtp.gmail.com with ESMTPSA id md16-20020a170906ae9000b008cafeec917dsm6320017ejb.101.2023.02.23.11.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 11:52:08 -0800 (PST) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 23 Feb 2023 19:28:51 +0000") 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:256523 Archived-At: On Thu, 23 Feb 2023 at 19:28, Jo=C3=A3o T=C3=A1vora wrote: >> > > In general, reporting coordinates in columns between programs is >> > > problematic. We see this in many cases, starting with spellers. >> > >> > Yes, I agree this is problematic -- as soon as you leave the wonderful >> > world of UTF-8. The point of this patch is to stay in that wonderful >> > world as long as the server agrees to it, which I hope will become >> > commonplace. >> >> Actually, the really "wonderful" world would be if the offsets were >> reported in character codepoints, because buffer positions are both >> the easiest for us to count and are unequivocally defined. > > I quite agree. Yes, everybody agrees! > Is this "count in codepoints" capability defined in LSP at all? That's _exactly_ what the patch implements =F0=9F=A5=B3. And then it also provides a second option, which is to use "bytes of the UTF-8 representation" as the unit of measurement. And then only as the third option it falls back to the "LSP abiding" nonsense.