all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "João Távora" <joaotavora@gmail.com>, 28814@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <a1c778d1-d0a2-1b09-8732-c98597412bda@yandex.ru> (raw)
In-Reply-To: <871slyi3lk.fsf_-_@gmail.com>

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?





  parent reply	other threads:[~2017-10-23  2:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 16:07 bug#28814: 26.0.90; When *xref* window is needed, original window-switching intent is lost João Távora
     [not found] ` <handler.28814.B.150791088020837.ack@debbugs.gnu.org>
2017-10-16 17:58   ` bug#28814: Acknowledgement (26.0.90; When *xref* window is needed, original window-switching intent is lost ) João Távora
2017-10-20  9:13   ` bug#28814: [BUMP, PATCH] " João Távora
2017-10-20 10:39     ` Dmitry Gutov
2017-10-23  2:06     ` Dmitry Gutov [this message]
2017-10-23  8:23       ` João Távora
2017-10-23 20:03         ` João Távora
2017-10-25  0:24           ` Dmitry Gutov
2017-10-25  7:43             ` João Távora
2017-10-25 10:24               ` Dmitry Gutov
2017-10-25 13:29                 ` João Távora
2017-10-25 14:49                   ` Dmitry Gutov
2017-10-25 15:35                     ` João Távora
2017-10-25 15:46                       ` Dmitry Gutov
2017-10-25 15:11             ` Eli Zaretskii
2017-10-25 15:27               ` João Távora
2017-10-25 15:39                 ` Eli Zaretskii
2017-10-25 20:56                   ` João Távora
2017-10-26  7:56                     ` martin rudalics
2017-10-26 16:42                     ` Eli Zaretskii
2017-10-26 22:40                       ` Dmitry Gutov
2017-10-27  0:05                         ` João Távora
2017-11-02 17:06                           ` Dmitry Gutov
2017-10-26 23:59                       ` João Távora
2017-10-28  9:41                         ` Eli Zaretskii
2017-10-28 19:19                           ` João Távora
2017-11-02 17:03                             ` João Távora
2017-11-02 17:07                               ` Eli Zaretskii
2017-11-02 19:07                                 ` João Távora
2017-11-02 19:32                                   ` Eli Zaretskii
2017-11-03 13:47                             ` Eli Zaretskii
2017-11-03 16:18                               ` João Távora
2017-11-03 19:06                                 ` Eli Zaretskii
2017-10-26 12:39                   ` Dmitry Gutov
2017-10-25  7:46           ` martin rudalics
2017-10-25 13:19             ` João Távora
2017-10-26  7:56               ` martin rudalics
2017-10-25  0:07         ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1c778d1-d0a2-1b09-8732-c98597412bda@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=28814@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.