From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: etags to xref changed navigation Date: Tue, 23 Apr 2024 20:15:45 +0300 Message-ID: <86a5lk3sqm.fsf@gnu.org> References: <87sezdqvox.fsf@vps.thesusis.net> <86edax5s9t.fsf@gnu.org> <87frvc6mhy.fsf@vps.thesusis.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8908"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 23 19:16:48 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1rzJlA-00026e-5o for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 23 Apr 2024 19:16:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzJkc-00038F-1m; Tue, 23 Apr 2024 13:16:14 -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 1rzJka-00037e-7T for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 13:16:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzJkZ-0000az-RJ for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 13:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xOO+x66/zMUbXY6iqD66unZE/wrVMK0lozDiw8yqk6U=; b=EaL0VmeO1GKK 96n1JdshRBIAykDdhw654jIFIStIuczmPjM+RsCsSQbbgo1tneO27pGVGeeQqcBdOpWouA8GLXXaB tT9lCrWk12k8EtX4rZ35vQ4n1/7Z6eDRpMegdlWTCgM28g/dLRy+bCPPeEUQEg7hf2gSb+0e1cHeK jKhsUXkScB/cCNu2Wme5n/8WF06bV1TQ6vRRNr/a1skVTH/rDNMWADiDKzsYJNPwA+hRDDPczbEy4 nb7m7cPVsKaMt1LPsHSR8vkGhFuJvKXctW6aswLWmDNZ6rUn/DMwTQ6mT1XFbARCN8Z5HVPJI8t9O jL3RTK3BSo3GrLRtCjruug==; In-Reply-To: <87frvc6mhy.fsf@vps.thesusis.net> (message from Phillip Susi on Tue, 23 Apr 2024 13:02:17 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146451 Archived-At: > From: Phillip Susi > Date: Tue, 23 Apr 2024 13:02:17 -0400 > > Eli Zaretskii writes: > > > The old behavior is supposed to be necessary much less with xref, > > since xref's search is more accurate, and usually finds only one > > candidate. So I'd be interested to know in what programming language > > do you see many candidates, and why. > > Typically there is only one *definition*, but many *referenecs*. Now I'm confused: M-. and M-, were about finding *definitions*, not references. If you want to find references, you need to type M-? instead. So I wonder what am I missing here. > > In addition, you haven't explained why you find the navigation in the > > XREF buffer slow and cumbersome. Basically, once you switch to the > > XREF buffer, you can display next/previous candidate with a single > > key, which is not more typing than "M-," (and there's the ability to > > select a candidate that is not next or previous, something "M-," > > couldn't give you). In addition, you can customize the variable > > xref-auto-jump-to-first-definition to the value 'move' or 'show', in > > which case the first candidate will be shown even if there are several > > candidates. > > I find the window splitting to be a bit annoying, and if I want to poke > around each callsite a bit, I have to keep switching windows with C-o to > move between exploring, and moving to the next callsite. You don't need to switch windows if you don't like it. Customize xref-auto-jump-to-first-definition to the value t, and move between candidate with "M-g M-n" and "M-g M-p". This way, you never need to go to the window showing the *xref* buffer. (If you want that for M-?, customize xref-auto-jump-to-first-xref instead.) > > If you still want to have the old behavior back, you can rebind M-. to > > find-tag and M-, to tags-loop-continue, which still exist, just > > without the default key binding. > > Do they still function the same, especially if you are using eglot? I > thought I checked and found that tags-loop-continue was obsolete/removed > in emacs 29. They work the same as they did before, and are obsolete, but not removed. They don't support Eglot, of course, since find-tag never did. So if you want to have Eglot support, I suggest the customization described above, it should give you the same UX as the old bindings, albeit with different keys and the *xref* window which will be popped up.