From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Sat, 11 Nov 2023 11:22:21 +0000 Message-ID: References: <83o7p20wdi.fsf@gnu.org> <72b09256-5a1b-8962-9e3c-7d2ffd0dc0d7@yandex.ru> <83ilf925n8.fsf@gnu.org> <95afa441-18ae-e62a-be16-be73a545bbba@yandex.ru> <65a16247-1b1a-149c-b413-71612f88f184@yandex.ru> <9377bf2b-13ed-8d86-4294-0b88e6808d80@yandex.ru> <953056ea-9cfb-34ad-6515-9036633dfdbb@yandex.ru> <2d964697-2b4e-64c7-2f16-aae87e57def4@yandex.ru> 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="17781"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Spencer Baugh , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 11 12:20:12 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r1m28-0004Pi-4b for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Nov 2023 12:20:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1m1V-0006F9-UM; Sat, 11 Nov 2023 06:19:34 -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 1r1m1T-0006Ew-IU for emacs-devel@gnu.org; Sat, 11 Nov 2023 06:19:31 -0500 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1m1R-00037O-SB for emacs-devel@gnu.org; Sat, 11 Nov 2023 06:19:31 -0500 Original-Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507cd62472dso4398091e87.0 for ; Sat, 11 Nov 2023 03:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699701568; x=1700306368; darn=gnu.org; 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=paZ8SGRfMevGSXNB+9aDDMlom6F7zngyTSf+CGxYPqs=; b=k0VCDMvFjrA0vHYwAiTha595iisKFGAFhAGJHrwPedfXtaLFsM4n+zh3CTcHPR2b2L LyP5QzwIIjqA5skmZQ1fPtMg53fj0x5EYZcyp1QyZDDZPn7iRerotHA7z7HDbVoxEiC9 jkk9x2Bw9q//6b5uCgCnxXDu4MaK9n2LlB7BDgOsoQBz2k+voFfD1GVDF+v5mRZPrXVZ dqc8i5+YD9SY+ecE057YmzhHttdLP6dGmL9oZMo9z4dDWiP/kklJ8VstmnkGxLs/xmRx rMolThgmcusc+oXl5WjyYFfYSxzqEdngSWqM8ibD6OGMNrTYNgATS4+hgssqVTQtthOV shgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699701568; x=1700306368; 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=paZ8SGRfMevGSXNB+9aDDMlom6F7zngyTSf+CGxYPqs=; b=wkLo/ibZaBfy6CGS4ymFhR/Q9vkITqcdlGE4gMs3NqcRrByHUEEQv7fqs3IQka2J6Q 5rjN96avBxkOE1rtp4oMhDmRJMxkMzna/cRuyybjf88n1FMgPGPblaIGa8UBnsXIRAbs spLWTJ6qlrECMuA9HNIsn5GI/W1oX3P6GrJn3NuIfdQw+D+XbD9HTQwoDcLxX3iz7LeF 7N/5Iru/edCVmfkpR9qb0kqdbAEKAlfCiFZRzxuaMS11g7gZVJZ4YZdpJ/ZQiGWzaSfr vw8c2FTNryCEL0bdKcY3YuIElZX8CEIvEwV4MvO2lYG8OzBpEc6M5Oh44Nn8foEqcPKw cfww== X-Gm-Message-State: AOJu0Yx4UKb3nEMVLn2v8fZCvV2qL8ujcCRx9+u8fX9U1l7VwRLJUZJd A4k4dqwT51YdIi/8g0pKZkT1WopC82Zl8NBKRTA= X-Google-Smtp-Source: AGHT+IFGvkn/ptm3Uff8KfXQj4rgl1MRfIQ0XOQVAAGyXTd0ipAco7M8cPPcxe283K9TAMNn0i9BD1rnHbsd1w8RX0o= X-Received: by 2002:a05:6512:1597:b0:4fe:b97:e361 with SMTP id bp23-20020a056512159700b004fe0b97e361mr877730lfb.18.1699701567364; Sat, 11 Nov 2023 03:19:27 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312541 Archived-At: On Sat, Nov 11, 2023 at 1:08=E2=80=AFAM Dmitry Gutov wro= te: > > On 09/11/2023 22:44, Jo=C3=A3o T=C3=A1vora wrote: > > On Thu, Nov 9, 2023 at 7:23=E2=80=AFPM Spencer Baugh wrote: > >> Jo=C3=A3o T=C3=A1vora writes: > >>> On Wed, Nov 8, 2023 at 11:34=E2=80=AFPM Dmitry Gutov wrote: > >>>>> But neither was available at the time, so I did those commands and = they won't > >>>>> be obsoleted any time soon. > >>>> Reasons being..? > >>> That we can't come up with alternatives to exactly that interface, > >>> obviously. When you do, I'll obsolete them. But do you want to hard= code > >>> things like LSP "typeDefinition" and Sly's "who-macroexpands" somewhe= re > >>> in xref.el? How would that work? > >> Right, so if we have kinds defined in the core for "declaration", > >> "implementation", and "type-definition" (maybe not with those exact > >> names), then we can have xref-find-declaration, > >> xref-find-implementation, and xref-find-type-definition (again maybe n= ot > >> with those exact names), and just do > >> > >> (define-obsolete-function-alias 'eglot-find-declaration 'xref-find-dec= laration) > >> (define-obsolete-function-alias 'eglot-find-implementation 'xref-find-= implementation) > >> (define-obsolete-function-alias 'eglot-find-typeDefinition 'xref-find-= type-definition) > >> > >> Is that possible? > > For Dmitry to answer > > FWIW, the above is one of the alternatives that I had in mind when I > mentioned obsoleting the said commands. > > The other alternative looked like this, though: > > (make-obsolete 'eglot-find-declaration "use `xref-find-extra'" "...") > (make-obsolete 'eglot-find-implementation "use `xref-find-extra'" "...") > (make-obsolete 'eglot-find-typeDefinition "use `xref-find-extra'" "...") No, I'm not obsoleting those commands, sorry. Not least because new LSP things may come along that xref.el won't be able to respond in time with. So those commands are staying there. The "declaration/implementation/typeDefinition" triplet is an LSP invention and Eglot is for LSP, so eglot- commands they will be, even if sometimes later in an eglot-commands.el file along with other ones. And that's even if we do import that LSP invention into xref (which I think we shouldn't -- see my reply to Spencer). Jo=C3=A3o