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:30:35 +0000 Message-ID: References: <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="17812"; 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:28:32 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 1r1mAC-0004Rc-2x for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Nov 2023 12:28:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1m9S-0008CN-6v; Sat, 11 Nov 2023 06:27:46 -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 1r1m9Q-0008By-Ls for emacs-devel@gnu.org; Sat, 11 Nov 2023 06:27:44 -0500 Original-Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1m9P-000640-1W for emacs-devel@gnu.org; Sat, 11 Nov 2023 06:27:44 -0500 Original-Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5099184f8a3so3217026e87.2 for ; Sat, 11 Nov 2023 03:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699702061; x=1700306861; 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=mcBSi3Bay/Qass5p3QlFAG0sVEgw8b2o0aeJppeI0Rc=; b=Gfx48e/B2OPRTahrIuG+WsT3WzRcNZNOASr51RN6zfzwkao44gK/qQFhdc4VAghCnC AwVkEV6soq/QC/y3MZmh0DQa4ZGfryTeILtWWG5lW7PojS9GAnYBU36BlYOEFgaBnJPG YYmu4KV1R3w8VCbkgH7vdCboN8r7MTwYINT1zzBbLUCD1ofJ5r+RtS3KBhQLnztFUIv4 HviGeuFKfJdhNEL7ba41WCgPPXvel9u/5EbOhe5s4gyrYMlK1vDqwXpoHoZDRUe3WRde V/bTXdRBUeM/JYtJHigIRaKbsauWbY7/anVxEmjp+vJ9Bq2YnC7UMPLkAAZvHLLRF47B Ok2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699702061; x=1700306861; 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=mcBSi3Bay/Qass5p3QlFAG0sVEgw8b2o0aeJppeI0Rc=; b=P62W9+H2LLSnJH4Y3v3v3o+OIzOBJvRhuPCo6zrxxYr73zvbIg7Ez3IdNK2H0x4SIZ 0PhBt196ENmyQ0CscQy4/vIwHARoP3v0sff53BbtvJiXEnDeT4fBEXa9ZKK6XDxXbrkN OBvhH4A9PQeTQSk/7JHTitmirPsKkPnrXoUYMX0keYI/6Zc+X26FKctGonJ9irL6CG7I r/F/YzeTzD0RnaWiofhXd9DpWk4dFq1Bsw2eh2bxMURTblZH8HRKUGd5q42W2sDod+cZ s3sdfZFB7H0ILa7BwcY6K4oSZL7F/u4wsbTG5ewdL1JSw5AGAuD7LG8StujyYNSz1cXL D6rQ== X-Gm-Message-State: AOJu0Yz93Q0xhEnkSrzWEuspAMHaxKVF/xbnb26kv45Iy98nW/OZhgBf RE29q1aOw45jhbADR9ChvRrauucxFO5BpNnI0X8= X-Google-Smtp-Source: AGHT+IEORMdKgh5+93Nx97CChKksS/kb63zBYu4V3tk54dyh1gwGqCVvLs1rfv9jOzp0r3QpYj2GQpv0mmOEjWtttrc= X-Received: by 2002:a05:6512:1083:b0:503:19d9:4b6f with SMTP id j3-20020a056512108300b0050319d94b6fmr1606193lfg.0.1699702060789; Sat, 11 Nov 2023 03:27:40 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x12a.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:312542 Archived-At: On Sat, Nov 11, 2023 at 1:05=E2=80=AFAM Dmitry Gutov wro= te: > > On 10/11/2023 12:06, Jo=C3=A3o T=C3=A1vora wrote: > > Really, what if the language du jour sometime in the future becomes > > something like C++ again? Will you add 'type-instantiation, > > 'type-specialization, 'partial-specialization, 'concept, and so on? > > Or the C++ backend somehow manages to index the loci of memory > > allocation to a given arena names at point. Will 'memory-allocations' > > also appear in xref.el? > > BTW, do you know of any LSP servers for C/C++ have > implementation-specific actions/endpoints for any of the things that you > mentioned above? Clangd, whose source code I've recently become familiar with, has the capability of doing all of those but my vapourware 'memory-allocations'. It doesn't expose endpoints to them, I think, but it's not fundamentally hard to do (clangd has a very rich index derived from the LLVM AST processing machinery, as you probably know). > > When I get around to finishing refactor.el which will inherit most of > > Eglot's UI for doing refactorings, I don't plan to burn the concepts > > of "organizeImports" and "quickfix" into it. They are LSP things. > > I things refactorings are inherently slower process, so having less > dedicated commands and more typing won't be a problem. > > Do you have any WIP code/patch/branch for refactor.el? I was thinking of > giving it a shot soon-ish, but it would start with extracting some code > from Eglot anyway. Yes, I have a refactor.el started, but ot sidetracked. I'll pull it up soon, it's still unfinished but I would love some help and am fairly certain we can collaborate to get at least the basics working. I think the xref-backend-extra-kinds/xref-backend-extra-defs is the analogue mechanism I was looking for and couldn't quite commit to but your patch and this discussion has helped me see it is a simple and viable way. Anyway, will try to do that coming weeks, do ping me if I forget, we can even pair-program via tmate or something. Jo=C3=A3o