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 16:35:11 +0200 Message-ID: <9ac758b8-5fb2-9b3d-7947-96777694e3e0@gutov.dev> References: <2d964697-2b4e-64c7-2f16-aae87e57def4@yandex.ru> <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="4759"; 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 15:36:21 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 1r7cih-0000wX-Gw for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Nov 2023 15:36:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7chm-000751-S0; Mon, 27 Nov 2023 09:35:22 -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 1r7chl-00074m-Ld for emacs-devel@gnu.org; Mon, 27 Nov 2023 09:35:21 -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 1r7chj-0000rC-Lk for emacs-devel@gnu.org; Mon, 27 Nov 2023 09:35:21 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9C37D5C022D; Mon, 27 Nov 2023 09:35:16 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 27 Nov 2023 09:35:16 -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= 1701095716; x=1701182116; bh=dkEAybeAuBoECQH8sQRr5M5WSCbhxW7esAZ oGMPSEyQ=; b=awPN6X9jopa9yXkzvsggp0um4rTzIclQGT6nJZ75DFd8tL0JZZz A4mpn7bi9XO0cBiTiCqEncoujIaU9Z0u3S2/acQsVKhW6+/OZU1y2jW8Ake89CEa nmBGnCt8kIeTcLU4zJMNQbESHkuE8cavCvAkywVfQ2p0/EhZRePyU2pKuV4ioLqP pr4V5+ZkymHYJ2Gmh208s1moMk/Q+7peenK3jAASd/GRc4m6nMJ/RvnY+BS8KKoi Ztu4OYXsjN81+7Od7w1Z4AZ/crx3ZYACi7P32EyegUHQGM3imtyzgqVxzR7ACPAo pHB8XemsgzbwulrF5wyL5L51haelwdoNGUg== 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= 1701095716; x=1701182116; bh=dkEAybeAuBoECQH8sQRr5M5WSCbhxW7esAZ oGMPSEyQ=; b=iI0irtA9SnfPv0O0fZmbSaY097Wact8TZf+bRkT6P3iviFtLuof SWB4yDepIjAYsD8DpLIs5h9h9Mx2PpLKmjzhyVmN1PiENoZwh8wpAOWz2r+n8/jT LyUslTOIE/2hvdAx2yl2fZNDJ9MwAt+c7x63X0/uVpBlBHIgU3kNtEJsq8ZuQaqL 74UOZFK64jMlhxtbyLuaK9565BRJUDDIbGm474ZGv94qhOajGRM9fvi8JrGka7TS xT8prwDizQ/FLQ05VjBnU8/mVgq/IRTdbe1zdiPIi158yi2dsRo/XD07kb81a9Tm 0v45fQnq/AFFG3iCdWPuhYnpLJW7GtW7WdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiuddgieejucetufdoteggodetrfdotf 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 09:35:14 -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:313268 Archived-At: On 26/11/2023 22:37, João Távora wrote: > On Sun, Nov 26, 2023 at 8:15 PM Dmitry Gutov wrote: > >> Eglot's integration shows that we don't in advance know whether a >> backend actually supports a specific kind. At least, we cannot know >> whether that kind is supported for a specific symbol at a given position >> (my tests with Eglot in the Emacs repo and clangd more than often ended >> up in "nothing found"). So to provide a list like ("definition/A" >> "documentation/B" ...) we'd have to first query all available backends >> about all kinds for the symbol at point. I think somebody said that this >> can be slow at least for some kind/backend/ls combinations. > > Who? Was it me? If so (I don't think so), I take it back. This is > absolutely fine. Eglot takes this list, from the capabilities reported > at the start of the LSP session and is very fast. What I'm saying is that *actually fetching* those might be slow (allegedly) for some combinations of kind/backend/ls. And to implement the kind of fallback Felician described, it seems we would first have to know what actual kinds of definitions are available for a given reference before providing the aforementioned. For optimal user experience, at least. The Elisp backend actually does that (only show the applicable kinds), but Eglot returns a fixed list for all symbols. >>>> 2. Whether Eglot should, in time, deprecate its corresponding three >>>> commands if Xref adds its own versions. >>> >>> I think one of João's design goals of Eglot is to rely on existing Emacs >>> features as much as possible. >> >> That was my expectation indeed, but lately he said that since the >> commands are already in Eglot, they will remain there. > > This is not my argument, as you well know. It was one of your explanations, among others, and it was one that I understood best. But one of the latest emails mentioned a separate Xref backend for c/c++ -- should I assume that every such backend would define its own set of *-find-* commands suitable for its languages? Would such backends each come with an automatically-enabled keymap? Or would the user have to set up key bindings for every such command, for every special backend like that?