From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Mon, 27 Nov 2023 17:01:58 +0200 Message-ID: <77500777-aea2-14db-4aab-7a5dff43443b@gutov.dev> References: <87il697r5g.fsf@catern.com> <87r0kw8nxu.fsf@catern.com> <3fe5a8cd-b355-d7eb-10ad-8846aef3387b@gutov.dev> <878r6mx1xc.fsf@betli.tmit.bme.hu> <90e4b9a7-3b51-587d-e317-b89e5d5464d9@gutov.dev> <87sf4scxax.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26107"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Felician Nemeth , Spencer Baugh , emacs-devel@gnu.org, Eshel Yaron , John Yates , Ergus , Filipp Gunbin To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 27 16:03:23 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 1r7d8s-0006YZ-92 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Nov 2023 16:03:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7d7v-0002IB-GQ; Mon, 27 Nov 2023 10:02:25 -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 1r7d7f-0002FX-Ah for emacs-devel@gnu.org; Mon, 27 Nov 2023 10:02:08 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7d7c-00067N-Ej for emacs-devel@gnu.org; Mon, 27 Nov 2023 10:02:06 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 30D225C01F4; Mon, 27 Nov 2023 10:02:03 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 27 Nov 2023 10:02:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701097323; x=1701183723; bh=bXruoklQ+aKdZMA/deOoJsQ5EsRRIF4XEEs U8Z2f4Zg=; b=FgJkuzwAWZB0aXjkRoxHZraOzyy11jSSCSqe59VXzm8ETn08oB2 73KuO9YvtTFGpzzuhu39EqlOO0idaGO41F4367PcjhdZ8ga/Rkq5nMI4wS14oHe4 pPXr8RekB+L48KwbMSAwURB+gNsn+XVxmvuFvC5m7ojd4jkcREtdNymdMfBqzfoB GU0hhgcahWt7bpbFg4mNXIM70qbtbr0oBvU3/ZIW1nGDTxrnyoqlRrqLj0FQq6GR YUWw4QF76iXj2/MvzqEta0/IhOE5kgsa6i7oUWndxbu/IJA4/t3ZMa8vfjH7t0pG cssGUSUYNgsESB+6DftX1LoNavuYSi+fbzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701097323; x=1701183723; bh=bXruoklQ+aKdZMA/deOoJsQ5EsRRIF4XEEs U8Z2f4Zg=; b=jMMKyFFwytoME/5qiyoZa+CA5Ktv//+nKdkSEtiW4aO4gtxveTw zU70nc8rtWHhoOHdnVSWzmGrrM4DwosnqNTld3sBqJvZCMB9HMA4OYrVyUkjpeK/ pnbxq1MKBmZM2zmcM8fh93c80bDO5cjqs0R+dZsQiRycmhCFHGmezVyWVJxQ5/Sg hUtA9gRz5fPRwdUjBdxoPVnhewfck0BD3c51yjywxDIguBZPCv2CPpRWsYVgY00H T+UdnzZE9GVSsyljYWPjKGd6qSkt3zEp5e1IgzzQnT5S+iPZh89qdR+dfgUAdLZ1 yOYUgLPN/zexZjWFWJKTbW9YKRn5TbGkQdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Nov 2023 10:01:59 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.26; envelope-from=dmitry@gutov.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -46 X-Spam_score: -4.7 X-Spam_bar: ---- X-Spam_report: (-4.7 / 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, NICE_REPLY_A=-1.857, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:313271 Archived-At: On 27/11/2023 16:49, João Távora wrote: > On Mon, Nov 27, 2023 at 2:43 PM Dmitry Gutov wrote: > >> (that's what the completing-read approach is for), and whenever we find >> out that particular kinds get supported by many backends (or by most of >> the available/popular ones), we could "pull them into the core", adding >> a global command with one binding which would work across languages. > > Alright, so since this is contentious (who else but you is pushing > this idea?) Indeed, I wonder if nobody else is interested in having the additional commands have pre-defined bindings, or having the same bindings across languages. > what about we start with 0 in xref.el. We can always > add to 0, no problem, but taking away from some other number > isn't so easy. We could indeed start with 0, but then I already see the same set of extra commands supported in Eglot, Elisp, lsp-mode >> and to allow frictionless extensions for special capabilities. > > As to frictionless extension, the macro I proposed already > xref-define-finder seems the easiest way by far. Sorry, I can't find it. But the definition of xref-find-declarations takes about 3 lines. There is not much potential for making it even shorter.