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: Sun, 05 Mar 2023 11:26:03 +0100 Message-ID: <877cvvh4uc.fsf@gmail.com> References: <87a614g628.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> <83bkljnpck.fsf@gnu.org> <874jrb9l6d.fsf@gmail.com> <834jrbnlaf.fsf@gnu.org> <87v8jr83ic.fsf@gmail.com> <83v8jrm4r0.fsf@gnu.org> <87fsav7x81.fsf@gmail.com> 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="15162"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Daniel Mendler , Eli Zaretskii , 61726@debbugs.gnu.org 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 Sun Mar 05 11:27:13 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 1pYlaD-0003ke-Hj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Mar 2023 11:27:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYla3-0007ep-RZ; Sun, 05 Mar 2023 05:27: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 1pYla2-0007XS-Bt for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 05:27: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 1pYla1-0002tR-RD for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 05:27:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYla1-0001Xu-Nh for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 05:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Mar 2023 10:27: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.16780119745890 (code B ref 61726); Sun, 05 Mar 2023 10:27:01 +0000 Original-Received: (at 61726) by debbugs.gnu.org; 5 Mar 2023 10:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:38548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYlZG-0001Wv-26 for submit@debbugs.gnu.org; Sun, 05 Mar 2023 05:26:14 -0500 Original-Received: from mail-ed1-f54.google.com ([209.85.208.54]:33622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYlZE-0001Wh-0C for 61726@debbugs.gnu.org; Sun, 05 Mar 2023 05:26:12 -0500 Original-Received: by mail-ed1-f54.google.com with SMTP id a25so27386658edb.0 for <61726@debbugs.gnu.org>; Sun, 05 Mar 2023 02:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678011965; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1xbs4nFuedOD+9mfIF8R7cFevOs2OjvWTqMuqfldTHI=; b=bhcTehoUHUt4HHAe6SxHZjH7MBMO/P4jhs7Y1YtGa6wCGyM8GUHAejTuORgGVEeQz0 jrwfOvvhSE7Cu8eGfdl+1CBreUYieRxpKyGZbQ7pHOOPIctR0RaLKGbZQ7o2w3ZtOq/Z psrBftdM8rs5a1wbh8C0C5bzptPuxbCpWrrSUPycx69DgSCPOIV1JHXPRujAd/hAFRWG DCeDVRcRiSVPRbZjsOerDgCEQS2+vrln7c91tbQUqRtqYnHGX4wNXktpobgXnnCX73Ot AuuINpB7YKLAhcIR1FZ52kdadGWeSPGLX/Mu6jvDjbP7O1kUkBb5ytPyZrMvGN8WupbQ c+qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678011965; h=content-transfer-encoding:mime-version:user-agent: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=1xbs4nFuedOD+9mfIF8R7cFevOs2OjvWTqMuqfldTHI=; b=C/nqu0XEsyyq2hkJcYzbgodqrcMU/tubjb9O2zhEv6dlHrii9Ly73pNzy6LcNeNSsT nDwWOyvRpfG1RN+N3NpVGu0XiC/l4zLFqcw325H2zZfrgwx1C9c7ZjGlEN29Kczoecj8 crhb9gNAQCvvD0OI8G8n8soeOqnZb/0iT7uoyJBqSLRHYZZyWRESBTVxt7BwAMKepwKX otin4iEZk25ex6F/ncy9eMUgtLgOqWKQK04ZVyTJuJJkzc3xyat+CaXTFXLvWeTPp8oX kOVRIuQmFM4OrDAzqxdZibMxXDuLsPjYmCPjg9wvX7SnUuhm4FNuhcbYmvLJBTCD2y9J 3dvw== X-Gm-Message-State: AO0yUKWiqqaHqDSwPcR9ugEsO+Am7Como+QFX6C+VXA26fWgZWuqkboK A4xwIyY4ny6V2gCKWZxMxUDu71JH79uNcA== X-Google-Smtp-Source: AK7set8jI3kEO/aX1tGzGqBt1BkBtAKTRgj49uu7Sv8BFDabc+3L3JwKSLbxqaJ1lRX5A48OBDzdZQ== X-Received: by 2002:a17:906:c001:b0:8b2:d70c:34ae with SMTP id e1-20020a170906c00100b008b2d70c34aemr7679839ejz.71.1678011965446; Sun, 05 Mar 2023 02:26:05 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::8b3a]) by smtp.gmail.com with ESMTPSA id z92-20020a509e65000000b004bc11e5f8b9sm3482979ede.83.2023.03.05.02.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Mar 2023 02:26:04 -0800 (PST) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Fri, 24 Feb 2023 18:55:18 +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:257344 Archived-At: On Fri, 24 Feb 2023 at 18:55, Jo=C3=A3o T=C3=A1vora wrote: > On Fri, Feb 24, 2023 at 6:08 PM Augusto Stoffel wro= te: >> 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. Actually, it might be better to use the compat library. I'm copying Daniel to ask if that is possible/recommended for "core" packages. I imagine adding compat to the Package-Requires and calling (require 'compat nil 'no-error) would work?