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: Fri, 24 Nov 2023 03:37:37 +0200 Message-ID: References: <953056ea-9cfb-34ad-6515-9036633dfdbb@yandex.ru> <2d964697-2b4e-64c7-2f16-aae87e57def4@yandex.ru> <87il697r5g.fsf@catern.com> <87r0kw8nxu.fsf@catern.com> <3fe5a8cd-b355-d7eb-10ad-8846aef3387b@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23115"; 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 To: Spencer Baugh , emacs-devel@gnu.org, Eshel Yaron , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , John Yates , Ergus , =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , Filipp Gunbin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 24 02:38:52 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 1r6L9e-0005n3-IA for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Nov 2023 02:38:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6L8h-0003O0-7a; Thu, 23 Nov 2023 20:37:51 -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 1r6L8f-0003Np-0b for emacs-devel@gnu.org; Thu, 23 Nov 2023 20:37:49 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6L8d-0004cd-01 for emacs-devel@gnu.org; Thu, 23 Nov 2023 20:37:48 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 40C353200A4C; Thu, 23 Nov 2023 20:37:44 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Nov 2023 20:37:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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= 1700789863; x=1700876263; bh=fXrw/pji1TQDlEPK44Ql6S537DrfzhUPXE/ qwHJSiMc=; b=kkxuK1efH1KyEz0HwEjHqRLFdU13GncUHXwshzhz6ieTlwjGtOu xhGOtCU64J+a94nD/A5R7GJ6qcI5E3KPM2QZHPUVRDKOCk38F3ejXtJ++WCYCFDg VAiLZEkwLquYj+FyhvzDBA8psk/SIZY80wrkckRkJKT1hRq3qV3PjGZZLvxIj8QT ZyOjNej8e+33e26cd/cPWXPM7zBGS4yD3A2+7Wf2Y/zcipzbDpKc7sEBQiGfX01h 1ZWAIEKAiGhfXAXcnX/Y7h/u2Qx6HqZYaNAYNOaYUxcGODVMwW7suwocMXtkUS3H tKVl2rUNBbIGW804kP8gKQHhUv5I9Br273Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1700789863; x= 1700876263; bh=fXrw/pji1TQDlEPK44Ql6S537DrfzhUPXE/qwHJSiMc=; b=S nfNKrE4sqSlo7qE72seVOPQdG1Fnt4fuOzmtalE1rN4rmsuUh1aZDkGA6gsFDGGq Ek9EZlPgq51tqZEkomjuV+MBL1z/ipku8J8w2YCrnCfpG9XvW2+uwSzDCeJL55Zp cch+gACVJ3GeP0I7qOggjnLIp655ZMace8VRUeHkaM7IbsXhPGOj9DzNEronyl3R WKnQ1WzqNFBGhI9dFRXblCZKX3nFvR42a5TrdbzU9EAOUvSLGpr+Y9p8t7abr2rd 7+iiXCt6KN4rD9pS08/8BLLdIwscOiODIKERYcPYZxrkPIAaWOjKk1cmfCcqln+8 9lu+efeDM7VFNXnZyBblg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehgedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 20:37:41 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.19; envelope-from=dmitry@gutov.dev; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 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.672, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=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:313162 Archived-At: On 15/11/2023 23:32, Spencer Baugh wrote: > Dmitry Gutov writes: >> On 11/11/2023 14:38, Spencer Baugh wrote: >>> So e.g. c-ts-mode could define >>> c-find-signature, which has a clear meaning for C. >> >> And c-mode will not. > > Some major modes will support things which other major modes do not > support. Users will use the best one, whatever it is, and we'll change > the default to whatever it is, eventually. I don't see an issue. I don't see why we have to limit the users to specific major mode, when one might have functionality others don't have, and vice versa. Like now, for example, many will likely stay with CC Mode for a while because of it more lax behavior in macro-heavy codebases, where c-ts-mode chokes and shows syntax errors. While others will hopefully like c/c++-ts-mode with its more accurate and faster parsing and highlighting. Anyway, I've pushed an update to the same branch (feature/xref-find-extra). Again, it's something to try out, not a done deal: * The command is called xref-find-all-definitions, with appropriate behavior when invoked without prefix argument (appends the results from all kinds and shows them together, with duplicates removed). * The Eglot implementation doesn't include 'references' in the list of kinds anymore, just because those are not definitions. * New commands for the 3 popular kinds, bound to "M-' e", "M-' i" and "M-'t". The command which shows all moved to "M-' M-'". What does everyone think? IMO the "all kinds together" view is interesting, but it all depends on what people actually find useful.