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: Sun, 5 Nov 2023 01:20:42 +0200 Message-ID: <1840c78c-3454-bf79-ffef-0dac99baabbc@yandex.ru> References: <834jqzafse.fsf@gnu.org> <83h6uv47e8.fsf@gnu.org> <4639d7ca-2109-864c-33c0-38e65f26f262@yandex.ru> <835ybb3txt.fsf@gnu.org> <83wn3q311i.fsf@gnu.org> <412afa2d-5dbc-52da-39c4-99be3873929c@yandex.ru> <83o7p20wdi.fsf@gnu.org> <72b09256-5a1b-8962-9e3c-7d2ffd0dc0d7@yandex.ru> <83ilf925n8.fsf@gnu.org> <95afa441-18ae-e62a-be16-be73a545bbba@yandex.ru> <81c2ff07-c5e2-fb3a-5945-049a307bff84@yandex.ru> <903dda91-0f2e-3cff-ba38-9da29c71a5c9@yandex.ru> <8f1ef615-d685-2a4d-e4c5-3fdaaba87d0f@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="14277"; 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: Spencer Baugh , Eli Zaretskii , stephen_leake@stephe-leake.org, john@yates-sheets.org, rms@gnu.org, fgunbin@fastmail.fm, casouri@gmail.com, emacs-devel@gnu.org, azeng@janestreet.com To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 05 00:21: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 1qzPxB-0003a0-1h for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Nov 2023 00:21:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzPwz-0004Ih-6A; Sat, 04 Nov 2023 19:21:09 -0400 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 1qzPwr-0004Hx-TV for emacs-devel@gnu.org; Sat, 04 Nov 2023 19:21:02 -0400 Original-Received: from forward502b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d502]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzPwm-0006mC-9b; Sat, 04 Nov 2023 19:21:01 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5da3:0:640:8139:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id 2EB765EA9D; Sun, 5 Nov 2023 02:20:51 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id lKjPp36WpOs0-4Uy6vvs9; Sun, 05 Nov 2023 02:20:50 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1699140050; bh=mW1UKZWrHJho06syVfEtmBs2dYUAt0n9nivRD/74mYk=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=PFgGTksj0WvGyejTw1KkN04KYK+LBw/3CgrIQBOaxnlq0vLlLENf0COfR9vBSMh/W 1YsuD55OvW8jdY9SL4pu+9/uoPb9wvFG3TC6REy1muD8Irtq7ff/zWbimC4OwaQqnX wwUSnG3cAow5GSpGm9gE9aIdETDwUn9lXuy30YBw= Authentication-Results: mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 4EBE327C0054; Sat, 4 Nov 2023 19:20:47 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 04 Nov 2023 19:20:47 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduuddgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepgfejhfduffegvdevtefhgfettefgfeelgfelffehgeehhfeiudehfedvffeg teegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Nov 2023 19:20:44 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:d502; envelope-from=dgutov@yandex.ru; helo=forward502b.mail.yandex.net X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 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, NICE_REPLY_A=-3.137, RCVD_IN_DNSWL_LOW=-0.7, 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:312232 Archived-At: On 05/11/2023 00:36, João Távora wrote: >>>> Speaking of the two former ones, though: is there a point in using two >>>> different commands, if their outputs never "intersect"? That is, one is >>>> for the macros, and another for regular functions. Why wouldn't >>>> 'slime-who-calls' also work on macros, printing their expansion sites? >>> I think maybe just to limit the signal to noise ratio. Maybe I'm >>> specifically interested in macro expansions only. But I kind of agree >>> that, at least in Lisp, calling and expanding isn't usually very different >>> in terms of what I want to know about such a site. >> >> But if who-calls only works for functions and who-expands only works for >> macros, only one of them would work for a given symbol, right? The other >> would return an empty list. > > Yeah, you're right, I guess. IDK, SLIME has always worked like that. I suppose one benefit would be in narrowed down completion, if the user inputs the symbol to search by hand. But that seems very minor. >>> Anyway, does this mean that xref.el is soon to have a solution for >>> this? The one I vaguely remember discussing in this thread. Something >>> like a single xref-find-other command + a selector for the type of >>> reference, right? >> >> Maybe it will, maybe actually not. See one of my next few emails with a >> patch to try out (with the things you mentioned) and some further >> questions to ponder. > > Will the patch have changes to Eglot as well? Hoping it does, but if it > doesn't leave some instructions on how to do that. That's mostly what > I'm interested in, i.e. how easy it is to plug into. The interface > is easier to tweak once we have concrete use cases to work with. Please see xref-find-extras.diff in the other email. Eglot -- or any other backend -- would need to provide overrides for xref-backend-extra-kinds and xref-backend-extra-defs.