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: Sat, 11 Nov 2023 03:08:40 +0200 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; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8764"; 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: emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Spencer Baugh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 11 02:09:44 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 1r1cV9-0001vj-IY for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Nov 2023 02:09:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1cUQ-0004xj-Hb; Fri, 10 Nov 2023 20:08: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 1r1cUP-0004xX-Jp for emacs-devel@gnu.org; Fri, 10 Nov 2023 20:08:45 -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 1r1cUO-0001ZU-04 for emacs-devel@gnu.org; Fri, 10 Nov 2023 20:08:45 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1B8165C021B; Fri, 10 Nov 2023 20:08:43 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 10 Nov 2023 20:08:43 -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=fm2; t= 1699664923; x=1699751323; bh=wMQQE5LPd0rQAAPCcZSyo2pqELaiKA1zrMW 8zvwbv/M=; b=HKT8u8ya6g5VdGlBNpka9wXjBnGXZQ7gnHMJSNZaMkJzUFHkp+7 bSbgp/oswZvIKxhWOWi+k7SN2kiqdr2o8lm2ECwuWWdq8gPRjC+YrFZR0taqwDrQ QeZmgsVKYCeBGM8k3Q2QJzRbfR4qmHvCdziKw/mARAph+HVhWAJpGDHRl8z0AYAC PqP+zLxr3nsFBp1nZqpk9vgQBWocWUVxqR7lRuYF3TXQK97+Mn9O6k69RS+Vf05o qDTxmkPQnxGkO9fjhLbYOD4YAgrqBypBjHUR/9NB2BIY5kdqAtwkNhm/HzS5XILn h1An2s0Gch2CTQjq37mB5iYQoDSk+tZvtPA== 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=fm3; t= 1699664923; x=1699751323; bh=wMQQE5LPd0rQAAPCcZSyo2pqELaiKA1zrMW 8zvwbv/M=; b=ROmXxNFYxkvaiVpwTbCYLMzZoEsEc9ETtPCbwb3vC0UGsRoP92L ahJHvBLxZh7xCjzKq4csmVbVGAYSIzN6XJS5ZXzpT2GAs6GgJ4TD02v42l02QuVe 35b/r/ur3qu0YqAJyY5ynLVRFEJeLLUjLR8pA8nDqISC4CrfGS3kziuIDvVHnPy7 VyS1fOlbxY8W1f8b4at08QREGjqmk6UXjLpAvTlX+jDz6w8gKIhi+iez4jyfA6zC NMagV8EglAb9HVyCYNwQ/AtMKWRuVybcQHH5IMndcyzxymyM0w20O39eIVRW1RiW UvB65vyKRp0hQkU/SCRSfquAo+HzrFUM00A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvgedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Nov 2023 20:08:41 -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: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.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, NICE_REPLY_A=-3.265, 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:312514 Archived-At: On 09/11/2023 22:44, João Távora wrote: > On Thu, Nov 9, 2023 at 7:23 PM Spencer Baugh wrote: >> João Távora writes: >>> On Wed, Nov 8, 2023 at 11:34 PM 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 hardcode >>> things like LSP "typeDefinition" and Sly's "who-macroexpands" somewhere >>> 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 not >> with those exact names), and just do >> >> (define-obsolete-function-alias 'eglot-find-declaration 'xref-find-declaration) >> (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'" "...")