unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* xref mode question
@ 2019-11-15 21:23 David Spain
  2019-11-15 23:28 ` Drew Adams
  2019-11-16  8:00 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: David Spain @ 2019-11-15 21:23 UTC (permalink / raw)
  To: help-gnu-emacs

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).

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.

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. 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.

Any suggestions appreciated.

Thanks,
David Spain



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: xref mode question
  2019-11-15 21:23 xref mode question David Spain
@ 2019-11-15 23:28 ` Drew Adams
  2019-11-16  8:00 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2019-11-15 23:28 UTC (permalink / raw)
  To: David Spain, help-gnu-emacs

> 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).

It's still available, BTW.  You can bind it to whatever
key you like (including `C-x 4 .').



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xref mode question
  2019-11-15 21:23 xref mode question David Spain
  2019-11-15 23:28 ` Drew Adams
@ 2019-11-16  8:00 ` Eli Zaretskii
  2019-11-16  8:04   ` Dmitry Gutov
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-11-16  8:00 UTC (permalink / raw)
  To: help-gnu-emacs

> From: David Spain <d.spain@comcast.net>
> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xref mode question
  2019-11-16  8:00 ` Eli Zaretskii
@ 2019-11-16  8:04   ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2019-11-16  8:04 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

On 16.11.2019 10:00, Eli Zaretskii wrote:
>> 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 think David is maybe reading documentation on the web (which is for 
the latest release), but trying this scenario in an older version (25.2.2).



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-16  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-15 21:23 xref mode question David Spain
2019-11-15 23:28 ` Drew Adams
2019-11-16  8:00 ` Eli Zaretskii
2019-11-16  8:04   ` Dmitry Gutov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).