[Top][All Lists]

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

Re: xref and displaying locations in appropriate window or frame

From: Dmitry Gutov
Subject: Re: xref and displaying locations in appropriate window or frame
Date: Sun, 24 Jan 2016 16:02:12 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/24/2016 01:55 PM, martin rudalics wrote:

I can only give my personal preference, feel free to ignore it: *xref*
would be displayed by ‘with-temp-buffer-window’ so that I can use
‘temp-buffer-resize-mode’ on it.

With its standard-output binding, with-temp-buffer-window is a kind of weird beast. Why would I prefer to use the low-level printing primitives, instead of `insert'?

Otherwise, I'd be happy to make temp-buffer-resize-mode work. But anyway, it seems orthogonal to my question: after *xref* is displayed already, how do I show locations from it?

> By default *xref* would be shown at
> the bottom of the frame with columns arranged as in the *Completions*
> buffer.

xref's output is tree-like. It seems hard to arrange it in multiple columns.

What if the original window is already at the bottom of the frame? And, say, isn't tall enough to split?

Conceptually, this should allow to split the "original" window into two
side-by-side windows where the left one would continue to display the
original buffer and the right one would display the buffer chosen by
‘xref-find-definitions-other-window’.  If there's already another window
on the side of the original window, that window would be reused by

How will this happen?

Obviously, if the frame is too narrow, splitting will fail and the
buffer will be shown in the original window.  But, as mentioned above,
there's nothing you can do about this.  The doc-string of
‘xref-find-definitions-other-window’ should probably mention it.

I imagine then the user might expect it to be shown above or below the original window. Won't they?

And ‘xref-find-definitions’ would display its buffer in the original
window above the *xref* window.

Yes, displaying the buffers in the original window is not hard, we just have to save a reference to it (although it'd be bad if the user switches to *xref* in that window manually).

reply via email to

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