From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rudalics@gmx.at, eller.helmut@gmail.com, emacs-devel@gnu.org
Subject: Re: xref and displaying locations in appropriate window or frame
Date: Sun, 21 Feb 2016 02:24:26 +0200 [thread overview]
Message-ID: <56C903BA.8050006@yandex.ru> (raw)
In-Reply-To: <837fiz3rv5.fsf@gnu.org>
On 01/24/2016 05:43 PM, Eli Zaretskii wrote:
>> However, now we have the *xref* buffer back in the picture. I think that
>> means we have to satisfy the this-window/other-window/other-frame
>> contract while *xref* is displayed.
>
> Yes, I think so. It will also fix the above confusion, IMO.
Having tried this, I don't think this is feasible.
First, if xref-show-location-at-point (called when ./,/n/p is pressed)
tries to satisfy the "other frame" contract, if the user hasn't done
some special frame-related configuration, doesn't use a tiling window
manager, etc, we get the location buffer displayed in a new, selected
frame on top of the current one. There's no way to keep pressing "n" or
"p" to jump through the locations.
Second, we shouldn't use one strategy in xref-show-location-at-point,
and another in xref-goto-xref: even if the user wanted to see the target
in a new frame, they are unlikely to appreciate seeing it both in "some
other" window in the current frame, and in the new frame as well after
they press RET.
So, retaining the other-frame contract is out. other-window is easier,
but, like Martin noted, the approach available to us (show in some
window that's not the original one, and not the xref one) is also iffy,
because it might be not _the_ "other window" respective to the original
one. The xref buffer could very well be displayed in that window, so we
can't use it.
Further, even though the user asked to display the destination using a
particular approach, by the time they choose the location from the list,
they might have forgotten their original request: several commands will
have passed by that time.
Overall, when the xref buffer gets to be displayed, I think always using
the "some other window" seems best after. We could also implement the
this-window/other-frame modifiers for xref-goto-xref later.
>> ...ideally, we'd have a different choice-picking mechanism in
>> this case (not *xref* buffer like it works and looks right now), but I
>> really don't know where to start writing it (and don't want to do it now).
>
> I think we should try the former route first, it sounds simpler.
>
>> Yet alternatively, as soon as we find out that there are several
>> definitions of the given function, we abandon all that
>> other-window/other-frame business, and simply make RET always behave the
>> same in *xref*. That seems like a cop-out.
>
> I think this should change, it's a confusing inconsistency if the user
> asked for another window/frame.
The inconsistency is unfortunate, but it stems from our attempt to
shoehorn the xref buffer into two different use cases.
Ultimately, I think the multiple-choice xref-find-definitions case would
be better served by a selection UI that emphasizes its transitiveness,
goes away as soon as the user made their choice, and itself has no
long-term impact on the window configuration.
It's probably best implemented using an overlay of some sort on top of
the current frame. See the similar feature in Atom (who inherited it
from Sublime) on the screenshots here:
https://atom.io/docs/latest/using-atom-moving-in-atom
I went in that direction in xref previously, when all changes made to
the window configuration by ,/./n/p were being undone before the next
command. But that was a half-measure anyway, and the "transient"
interface doesn't serve other commands well (those where you usually
want to operate on several locations from the list, and not just pick
one and forget the other matches).
It's worth noting that SLIME uses its xref buffer exactly in a transient
fashion, and Helmut's contribution had that behavior, but I've come to
believe it's a mistake.
next prev parent reply other threads:[~2016-02-21 0:24 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 19:36 tags-loop-continue Eli Zaretskii
2016-01-09 19:59 ` tags-loop-continue Ingo Lohmar
2016-01-09 20:22 ` tags-loop-continue Dmitry Gutov
2016-01-09 20:42 ` tags-loop-continue Eli Zaretskii
2016-01-09 20:49 ` tags-loop-continue Dmitry Gutov
2016-01-09 20:52 ` tags-loop-continue Dmitry Gutov
2016-01-09 21:19 ` tags-loop-continue Dmitry Gutov
2016-01-10 3:45 ` tags-loop-continue Eli Zaretskii
2016-01-10 4:00 ` tags-loop-continue Dmitry Gutov
2016-01-10 6:29 ` tags-loop-continue Drew Adams
2016-01-10 14:35 ` tags-loop-continue Dmitry Gutov
2016-01-10 15:26 ` tags-loop-continue Ingo Lohmar
2016-01-10 16:09 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:08 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:18 ` tags-loop-continue Dmitry Gutov
2016-01-10 17:53 ` tags-loop-continue Drew Adams
2016-01-10 18:12 ` tags-loop-continue Dmitry Gutov
2016-01-11 7:21 ` tags-loop-continue Eric Abrahamsen
2016-01-10 15:54 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:14 ` tags-loop-continue Dmitry Gutov
2016-01-10 17:08 ` tags-loop-continue Eli Zaretskii
2016-01-10 18:19 ` tags-loop-continue Dmitry Gutov
2016-01-10 19:01 ` tags-loop-continue Eli Zaretskii
2016-01-14 0:41 ` tags-loop-continue Dmitry Gutov
2016-01-14 16:00 ` tags-loop-continue Eli Zaretskii
2016-01-14 16:07 ` tags-loop-continue Dmitry Gutov
2016-01-14 17:17 ` tags-loop-continue Eli Zaretskii
2016-01-14 17:26 ` tags-loop-continue Dmitry Gutov
2016-01-14 17:39 ` tags-loop-continue Dmitry Gutov
2016-01-14 18:36 ` tags-loop-continue Eli Zaretskii
2016-01-14 18:46 ` tags-loop-continue Dmitry Gutov
2016-01-14 18:31 ` tags-loop-continue Eli Zaretskii
2016-01-14 18:44 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:02 ` tags-loop-continue Eli Zaretskii
2016-01-14 19:15 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:18 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:41 ` tags-loop-continue Eli Zaretskii
2016-01-14 20:09 ` tags-loop-continue Dmitry Gutov
2016-01-14 20:21 ` tags-loop-continue Eli Zaretskii
2016-01-18 19:19 ` tags-loop-continue Dmitry Gutov
2016-01-20 11:19 ` tags-loop-continue Eli Zaretskii
2016-01-21 4:59 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:02 ` tags-loop-continue Eli Zaretskii
2016-01-21 17:12 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:47 ` tags-loop-continue Eli Zaretskii
2016-01-21 18:58 ` tags-loop-continue Dmitry Gutov
2016-01-21 19:02 ` tags-loop-continue Eli Zaretskii
2016-01-21 19:11 ` tags-loop-continue Dmitry Gutov
2016-01-21 19:56 ` tags-loop-continue Eli Zaretskii
2016-01-21 20:15 ` tags-loop-continue Dmitry Gutov
2016-01-21 20:36 ` tags-loop-continue Eli Zaretskii
2016-01-21 21:17 ` tags-loop-continue Dmitry Gutov
2016-01-21 21:26 ` tags-loop-continue Dmitry Gutov
2016-01-22 6:59 ` tags-loop-continue Eli Zaretskii
2016-01-22 10:13 ` tags-loop-continue Dmitry Gutov
2016-01-22 14:08 ` tags-loop-continue Eli Zaretskii
2016-01-22 17:51 ` tags-loop-continue John Wiegley
2016-01-22 18:35 ` tags-loop-continue Dmitry Gutov
2016-01-24 1:26 ` next-error-function integration in xref removed Dmitry Gutov
2016-01-26 17:34 ` John Wiegley
2016-01-22 1:54 ` tags-loop-continue John Wiegley
2016-01-22 2:00 ` tags-loop-continue Dmitry Gutov
2016-01-22 5:34 ` tags-loop-continue John Wiegley
2016-01-21 5:15 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:07 ` tags-loop-continue Eli Zaretskii
2016-01-24 2:19 ` xref and displaying locations in appropriate window or frame Dmitry Gutov
2016-01-24 10:55 ` martin rudalics
2016-01-24 13:02 ` Dmitry Gutov
2016-01-24 14:38 ` martin rudalics
2016-01-24 14:53 ` martin rudalics
2016-01-24 17:08 ` Dmitry Gutov
2016-01-24 18:12 ` martin rudalics
2016-01-24 19:01 ` Dmitry Gutov
2016-01-25 9:50 ` martin rudalics
2016-01-25 17:04 ` Dmitry Gutov
2016-01-25 18:18 ` martin rudalics
2016-01-25 19:28 ` Ingo Lohmar
2016-01-26 10:05 ` martin rudalics
2016-01-26 23:31 ` Dmitry Gutov
2016-01-27 9:10 ` martin rudalics
2016-01-27 17:33 ` Dmitry Gutov
2016-01-27 18:08 ` martin rudalics
2016-01-27 18:35 ` Dmitry Gutov
2016-01-27 22:45 ` Juri Linkov
2016-01-27 23:13 ` Dmitry Gutov
2016-01-28 9:42 ` martin rudalics
2016-01-28 15:03 ` Drew Adams
2016-01-29 0:05 ` Juri Linkov
2016-01-29 7:27 ` martin rudalics
2016-01-29 23:36 ` Juri Linkov
2016-01-29 1:57 ` Dmitry Gutov
2016-01-29 7:27 ` martin rudalics
2016-01-29 13:59 ` Dmitry Gutov
2016-01-29 23:40 ` Juri Linkov
2016-01-25 22:39 ` Dmitry Gutov
2016-01-26 10:05 ` martin rudalics
2016-01-27 1:00 ` Dmitry Gutov
2016-01-27 9:10 ` martin rudalics
2016-01-27 18:43 ` Dmitry Gutov
2016-01-24 15:43 ` Eli Zaretskii
2016-01-24 17:27 ` Dmitry Gutov
2016-01-24 17:58 ` Eli Zaretskii
2016-01-24 18:03 ` Dmitry Gutov
2016-02-21 0:24 ` Dmitry Gutov [this message]
2016-02-21 23:49 ` tags-loop-continue Dmitry Gutov
2016-02-22 17:20 ` tags-loop-continue Eli Zaretskii
2016-01-17 23:12 ` tags-loop-continue Stefan Monnier
2016-01-18 1:37 ` tags-loop-continue Dmitry Gutov
2016-01-18 2:20 ` tags-loop-continue Stefan Monnier
2016-01-18 2:28 ` tags-loop-continue Dmitry Gutov
2016-01-18 2:48 ` tags-loop-continue Stefan Monnier
2016-01-18 2:57 ` tags-loop-continue Dmitry Gutov
2016-01-18 15:46 ` tags-loop-continue Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C903BA.8050006@yandex.ru \
--to=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).