GNU bug report logs - #44611
Prefix arg for xref-goto-xref

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 13 Nov 2020 08:33:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 44611 <at> debbugs.gnu.org, joaotavora <at> gmail.com, dgutov <at> yandex.ru
Subject: bug#44611: Prefix arg for xref-goto-xref
Date: Tue, 22 Dec 2020 10:58:35 +0200
>> And since the new keybinding have no disastrous effect, it would safer
>> for the users to adapt to the new keybinding.
>
> What disastrous effects?  AFAICT, TAB buries the XREF buffer, which is
> not a disaster.

It takes the same amount of efforts to bring it back: either by finding
the buried buffer in the buffer list, or running project-find-regexp again.

> More generally, I think it's wrong to try to make XREF buffers behave
> like *Grep* buffers.  They are different beasts, I think we
> established this long ago, when Xref was added to Emacs (I think I
> even made a comment regarding the difference, and Dmitry responded to
> the effect that this was intended).  *XREF* and *Grep* look
> differently and behave differently, and it's impossible to make them
> be similar enough.

They might be different when *xref* is used as a completions buffer
when the *xref* buffer is created by 'M-.' (xref-find-definitions).

Moreover, now it's possible to use the real *Completions* buffer by
customizing xref-show-definitions-function to xref--show-defs-minibuffer.
Even is this case TAB doesn't close the *Completions* buffer.

But a completely separate case is when the *xref* buffer is created
by such grep-like commands as project-find-regexp.

So currently there are two different uses of the *xref* buffer:

1. as a transient completions buffer that could be buried
   after a completion is selected from the buffer;
2. as a grep buffer for visiting the found matches.

In the second case, it's natural to type TAB to navigate results.

Should these cases use different modes with different buffer names?
Such as a buffer name *xgrep*?




This bug report was last modified 4 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.