[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xref mode question

From: Eli Zaretskii
Subject: Re: xref mode question
Date: Sat, 16 Nov 2019 10:00:27 +0200

> From: David Spain <>
> Date: Fri, 15 Nov 2019 16:23:57 -0500
> I'm using Emacs 25.2.2 and am trying to figure out a way in which from 
> the XREF window of an Emacs tags table search to get it to visit an 
> entry listed in that same window and not overwrite the original source 
> window I had open which I'm visiting the tag from. In other words, I'd 
> like the XREF window to go away and be replaced with the source from the 
> followed xref.
> I miss the older functionality of the default binding of 'C-x 4 .' or as 
> it was known in Emacs 23 and previous versions (find-tag-other-window).

There isn't any single command to do that, because making the XREF
window "go away" makes it hard to get that window back, if you want to
examine the other candidates.  However, you can close the XREF window
with the 'q' command, when you don't need it anymore.

The XREF facility doesn't usually show the XREF window, because it in
most cases finds just one candidate and shows it immediately, and in
those cases "C-x 4 ." works just like it did with etags.

We tried to implement something like what you want, but every attempt
caused some unpleasant side effects.

The problem is not bad, however, at least IMO, because you can easily
go back to your original source buffer with "M-,".

> I DO like the newer xref mechanism as it shows all found references, I 
> just want to be able to visit a specific xref without losing my original 
> source window in the process.

The C-o command tries to do that, but only if there's another window
showing the file where the tag lives.

> I thought maybe the <TAB> key would do this in the XREF buffer, the 
> documentation would lead me to believe that, BUT the <TAB> key doesn't 
> do anything but attempt to insert a tab into the XREF buffer.

??? Does that happen in "emacs -Q"?  It doesn't for me.

However, TAB just buries the XREF buffer, it doesn't necessarily leave
your previous buffer displayed in some other window.

> I do have a customization set on the <TAB> key for c-mode for the
> way I prefer it to work. Could that be causing trouble? I tend to
> doubt that.

Could be, trying in "emacs -Q" will tell.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]