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: Sun, 5 Mar 2023 21:04:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003a66d705f62d8681" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Helmut Eller , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 05 22:05:13 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 1pYvXc-0004qc-T3 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Mar 2023 22:05:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYvX1-0003tX-Ob; Sun, 05 Mar 2023 16:04:35 -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 1pYvWy-0003tM-MB for emacs-devel@gnu.org; Sun, 05 Mar 2023 16:04:32 -0500 Original-Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYvWx-0000ov-3m for emacs-devel@gnu.org; Sun, 05 Mar 2023 16:04:32 -0500 Original-Received: by mail-ot1-x32f.google.com with SMTP id r23-20020a05683001d700b00690eb18529fso4341825ota.1 for ; Sun, 05 Mar 2023 13:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678050269; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Yzs8ki99MNf/pFQBM56hAxi+pYLCueRgtLXQBoeSVTM=; b=I0i4wnO7I5v8MYOb9L1unqTz4WvGTChVcusAWlhhQeNWieKzfU026NSyLemAqXih/+ 91GT5gkouSb8eAur6Qc5N5sb9KDoutWTFAQkG0aMFmXeAMXmyhrFS/1yLIJfRd7J0qo8 NotVvmDAYC9RV+uS7zq9zWD8nwykDqPb/ONNmdDBoGfZfmalLw/S9FGIGrkw3J1Q8n5B 4OTBiZAswk5s2zB4DRbKrq4MrhgLbdlUwVvvji9aGTt7PjRyHTlrACkMCN2kyVv91zb+ v7toFnio0aIP7p0Y6KeWrYNWHACAwhYWfRnOzldJ8D8LdjZAbZ9Bo+3ayKxyC0DjbDc0 2TLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678050269; h=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=Yzs8ki99MNf/pFQBM56hAxi+pYLCueRgtLXQBoeSVTM=; b=zbrzDtBYCQfXnWobExvjXeoh3kOzYlTLzZotG9uSAqAooUy0ECGs30kXjJwc0//dJM DP+r1QIimML7SeV8Fu7jrsGrUQcZAwML67XV19QCRPtI8q8ySoRE72lDcX98hQ/ypbKM loQ47jU0JYPJPUeV/QzuWRZXaJzvCKoySFvTc4okuB1dxqhXjyAe+OH7Aipct8j5uTuz MShISgM8CapxJnHVoNDkO/p0PB4XAySxUHEZuJ+p7zQ0dB/0Wfi/ZES7EiAWIkgzjm1m v9uBox98oOG9fhPWE4umfOymIZnS8d5rRuzvMuDwotWysdz9/xwrIiHhOTjpGu9qgV4u kHVg== X-Gm-Message-State: AO0yUKVfWnTQ2BRn6aOZa7N+g4WfRMsmELHJ+yv4jcCGdJylktZrlP1w YaHji+ZQaPLWCTAsT/Vi1o/umhFhKdHOCtx2a8U= X-Google-Smtp-Source: AK7set/c0mshVNyMci4eqILPl/CbvYWQVVt7gyevxVLsh56e0jaCxw1voAc960j4E2zRyz5oe9tcsAlfPbzpEDdjjto= X-Received: by 2002:a9d:724c:0:b0:68b:ccee:5ead with SMTP id a12-20020a9d724c000000b0068bccee5eadmr2830814otk.3.1678050269487; Sun, 05 Mar 2023 13:04:29 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x32f.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:303996 Archived-At: --0000000000003a66d705f62d8681 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 5, 2023, 20:40 Dmitry Gutov wrote: > On 05/03/2023 22:32, Jo=C3=A3o T=C3=A1vora wrote: > > To clarify, i think the thin commands and the keybinds should be in the > > major modes, but these commands should be thin and use xref as a > > library. And the backend should be Eglot's, if it happens to be > > managing the buffer via LSP, else out can be whatever the major modes > > sets up. > > xref-find-declarations should be bound by major modes? Which modes? > No, you misunderstand. I wrote "commands and keybinds should be in the major mode". Xref-find-declarations should not exist, because declaration is not a universal thing common to all languages. That was Helmut's point AFAIU, and i agree with it. Which modes? The ones where "declaration" is a thing. IOW xref should try to stay language-agnostic, but provide common framework for language-specific things like major modes to reach backends like Eglot or anything else Mind you the same point made for xref can be made about LSP, language-agnostic on paper, but many a language-specific concept poorly disguised in there. But I see no reason to copy that flaw. Jo=C3=A3o > --0000000000003a66d705f62d8681 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Sun, Mar 5, 2023, 20:40 Dmitry Gutov <dgutov@yandex.ru> wrote:
On 05/03/2023 22:32, Jo=C3=A3o T=C3=A1vora wrote:
> To clarify, i think the thin commands and the keybinds should be in th= e
> major modes, but these commands should be thin and use xref as a
> library. And the backend should be Eglot's,=C2=A0 if it happens to= be
> managing the buffer via LSP, else out can be whatever the major modes =
> sets up.

xref-find-declarations should be bound by major modes? Which modes?

No, you = misunderstand. I wrote "commands and keybinds should be in the major m= ode". Xref-find-declarations should not exist, because declaration is = not a universal thing common to all languages. That was Helmut's point = AFAIU, and i agree with it.

Which modes? The ones where "declaration" is a thing.=C2=A0

IOW xref should try to st= ay language-agnostic, but provide common framework for language-specific th= ings like major modes to reach backends like Eglot or anything else=C2=A0

Mind you the same point m= ade for xref can be made about LSP, language-agnostic on paper, but many a = language-specific concept poorly disguised in there. But I see no reason to= copy that flaw.

Jo=C3= =A3o
--0000000000003a66d705f62d8681--