[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: Wed, 27 Jan 2016 02:31:44 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/26/2016 01:05 PM, martin rudalics wrote:

Now first we have to agree that in our example above
O and T behave as "file windows" and X is a "view window"...

Keeping file and view windows in a way that file windows form an inner
rectangular area and view windows are arranged around that area has the
following advantages:

- View windows can be easily made persistent...
- View windows can be arranged in a predictable way so that the user
   always finds them in a specified part of the frame.
- Most IDEs implicitly dedicate view windows to their buffers.  So we
   would not have to worry about how to do that with our X window.

First, I'd like to point out that your suggestion was to split the current window and display X in the bottom part of the split. Which, if there were, say, two side-by-side windows originally, wouldn't put X in any of "classical" areas designated for "view" windows by IDEs.

But suppose I misunderstood, and the end result would be putting X into a lower part of the frame, below all file windows. Which fits an average IDE fine, because they don't have side-by-side splits for file windows (let's keep to Emacs terminology here), so one can at least expect that a average line of code is more or less as long as the frame width. Maybe less, but probably longer that width/2.

Thus, a file search output will be just as wide, and one can't really do better that display it in a full-width window as well at the bottom. I'd say that would show too few lines, when my font of choice is used, but the IDEs seem to handle it fine somehow with their defaults.

That's not necessarily untrue in Emacs community, where we're often more conservative, and hold to 80-100 chars per line. Then, we can afford to put file windows side-by-side, and xref output (though not Grep, because it includes a file name on each line) is about the same width, so by putting it at the bottom we'll waste the right half of the "view windows area".

But I don't really have a better layout in mind, and different long-time users probably solve this question differently. So, really, the best I can do is use as much from the default window allocation strategy as I can, and hope that users with more exotic demands manage to override the given behavior to their satisfaction.

reply via email to

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