Subject: Re: bug#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed, original window-switching intent is lost )

From: [email-masked] (João Távora)
Date: Wed, 25 Oct 2017 14:29:45 +0100

Dmitry Gutov <[email-masked]> writes:

> It would have given a more consistent mental model, though. And it's
> something that corresponds to some users expectations already.
>
> Think Ctrl-P or "Goto Definition" preview in Sublime Text. You can
> look at the destinations and pick one, or not pick anything, and the
> tabs list would be intact.
> ...
> I agree that it might be a step forward, and help you retain some main
> aspects of behavior that the users are accustomed to. I just wish it
> was a step toward a more well-rounded UI.

It seems you’re talking, in part, of the expectations of users coming
from more "modern" UI’s, like Sublime’s. I can understand that argument,
but I also argue that not drifting too much from the (twitchy, I’ll
admit) window popping behavior of Emacs is useful in its own right.

For example, I’d argue that Emacs users are almost universally used to
’C-h f/c/m’ stuff bringing up obtrusive windows that they can quit by
typing ’q’ and get back to their original configuration (provided, yes,
that they don’t mess with the window configuration in the
meantime). It’s the number one thing that annoyed me in my early Emacs
days, and I see a lot of people confused by it, until they learn how to
’q’. Other examples are the default completion UI and the "disabled
command" interface.

If that UI can be improved, it certainly should. (I have some very old
ideas about a single window dedicated frame for help windows that could
be discussed and developed). But whatever is done it should be done to
Emacs as a whole, to preserve consistency.

In the meantime, my xref patches try to stay close to the current
paradigm.  Additionally, they should benefit automatically from any
future improvements.

> But 'a' (correct me if I'm wrong) normally replaces a buffer in the
> *current* window. And kill the previous buffer.

I can’t correct you because I had no idea of that convention either. I
just mentioned ’a’ because I read it somewhere in the discussion.  I’ll
be fine with any key that means "yes I’ve really decided I want to go
here now take me there and bury this buffer".  As a last resort, an
unbound command that I can remap RET to, or a decent interface that
allows me to write such a command.

>> Of course my priority goes towards RET doing xref-quit-and-goto-xref and
>> something else doing xref-goto-xref. If that default isn’t changed, I’ll
>> probably to that remap in my init file..
>
> So you'd always use "something else" to navigate to
> project-find-regexp search results?

No, I’d use "n" or "SPC". These work fine as always. When I find the one
I want to edit, I press "RET". I’m a big boy, I can find the *xref*
buffer again :-)