GNU bug report logs - #28814
26.0.90; When *xref* window is needed, original window-switching intent is lost

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Fri, 13 Oct 2017 16:08:02 UTC

Severity: minor

Tags: patch

Found in version 26.0.90

Done: joaotavora <at> gmail.com (João Távora)

Bug is archived. No further changes may be made.

Full log


Message #19 received at 28814 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: João Távora <joaotavora <at> gmail.com>,
 28814 <at> debbugs.gnu.org
Subject: Re: bug#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed,
 original window-switching intent is lost )
Date: Mon, 23 Oct 2017 05:06:37 +0300
Hi Joao,

On 10/20/17 12:13 PM, João Távora wrote:
> Hoping someone can take a look at this bug I reported a week ago.  Here
> are two very simple Emacs -Q recipes that demonstrate it.

You are working on something that I agree is a real problem, but doing 
this would effectively revert commit 
5698947ff9335cf150c73cca257a5e7e5951b045, which was based on a previous 
discussion (see the link in the commit message), and in particular, 
would bring back "disappearing *xref* buffer problem", as Eli put it.

The essence of the problem is that xref buffers try to serve two related 
but distinct purposes that the user might be aiming at:

- Pick a result from the list and jump to it, forgetting the rest 
(basically providing a completion interface).
- Iterate through results and do something with each of them in turn.

Even for xref-find-definitions, we can't rule out the purpose #2. Again, 
also see the previous discussion.

I have a rough idea on how to fix the situation, but nothing even close 
to an implementation.

>     emacs -Q
>     C-x 3 [split-window-right]
>     C-x 2 [split-window-below]
>     M-. xref-backend-definitions RET [xref-find-definitions]
>     C-n [next-line]
>     RET [xref-goto-xref]
> 
> Expected the definition to be found in the original window where I
> pressed M-. but instead it was found in another. Another case:
> 
>     emacs -Q
>     C-x 4 . xref-backend-definitions RET [xref-find-definitions-other-window]
>     C-n
>     RET
> 
> Expected the definition to be found in some other window, different from
> the one I pressed M-. on. Instead went to the same one.

With your patches applied, this example pops a new frame for me if I 
press 'n' instead of 'C-n'. This is not hugely important in the light of 
the larger problems above, but demonstrated difficulties with window 
management when we try to pretend that the xref buffer "was never there".

> Also, in both
> situations, expected the window configuration to be the same as if I had
> searched for, say xref-backend-functions.
> 
> This is fixed by the patches that I reattach after minor tweaks. The
> general idea is to have the *xref*, whose sudden appearance is hard to
> predict, obtrude as little as possible on the user's window
> configuration.

If we don't bring back the "disappearing *xref* buffer problem", *xref* 
has to stay obtrusive. Do you think the rest of your patch will make 
sense with that change?




This bug report was last modified 7 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.