emacs-devel
[Top][All Lists]
Advanced

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

Re: xref and displaying locations in appropriate window or frame


From: martin rudalics
Subject: Re: xref and displaying locations in appropriate window or frame
Date: Thu, 28 Jan 2016 10:42:00 +0100

> Implementing an IDE-like mode in Emacs implies displaying the *xref*
> buffer in the same fixed bottom window shared with all other view buffers
> like *grep*, *compilation*, *Completions*, ...
>
>   ------------
> |  O  |   T  |
> |     |      |
> |------------|
> |     X      |
>   ------------
>
> and using the tab-bar to switch between these buffers in that bottom window.

Alternatively, it should be posible to display *xref* and *grep in two
side-by-side windows on the bottom of the frame like:

 ------------
|  O  |   T  |
|     |      |
|------------|
|  X  |   C  |
 ------------

I always wanted to rewrite ‘tabulated-list-mode’ so that it auto-adapts
columns to the size of the corresponding window whenever it changes.

> One problem with xref is that currently it doesn't keep the *xref*
> buffer displayed all the time during the next-error navigation,
> and I don't understand why.

I suppose there should be three modes but my understanding of this might
be completely inadequate:

- One that never displays the *xref* window but displays the next target
  buffer via a command.  This is what etags did once IIRC.  I don't know
  whether it's still around and has/had suitable navigational facilities
  to return to the previous target buffer, for example.  Completion at
  point works in a similar way if I'm not mistaken.

- One that keeps the *xref* window open forever until the user deletes
  it explicitly.  That's the variant we discuss here.  I think that this
  variant should show the *xref* window at the bottom of the frame and
  should show *xref* even if there is only one possible choice.

- One that auto-hides the *xref* window as soon as the user makes a
  choice.  That's the one proposed by xref.el and I believe it would
  need an explicit command to redisplay the *xref* buffer instead of
  asking the user to explicitly switch to it.  This variant should show
  the *xref* buffer via ‘pop-to-buffer’ and probably replace it with the
  target buffer whenever the user makes a choice.  It would immediately
  show the target buffer when there's only one choice.  Completing via
  the *Completions* window very much works according to this principle.

It might be also useful to mix these approaches by having one command
that shows the target buffer and buries the *xref* buffer and another
command that shows the target buffer and leaves the *xref* window alone.

Sorry if I misinterpreted things.  Alas, the ‘next-error’ discussion so
far escaped my attention.  Any reassessment of what it's supposed to do
and how that is related to showing something in a window would be highly
welcome.  The thread of bug#20489 is too confusing for me.  At the very
least, the term ‘next-error’ for xref sounds like a misnomer to me.

martin




reply via email to

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