all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: 35737@debbugs.gnu.org
Subject: bug#35737: xref--original-command
Date: Thu, 16 May 2019 01:30:22 +0300	[thread overview]
Message-ID: <f56983ad-a439-15cd-3651-449dcad6ab6d@yandex.ru> (raw)
In-Reply-To: <87tvdvpgzj.fsf@mail.linkov.net>

On 16.05.2019 0:04, Juri Linkov wrote:

> I don't propose to change its default behavior.  Just allowing its
> customization would be good.

OK.

But please wait a little, I'd like to show a patch for bug#35702 that 
can also provide a basic for the same distinction in functionality but 
without this variable.

>> Having two buffers that looks basically the same but react to RET
>> differently is not great for usability.
> 
> Using display-buffer-in-direction, they don't look the same: after
> customization xref-find-definitions can display the xref buffer below,
> whereas other xref command can display in the side window.

OK. Still look very similar, but at least the behavior appears different 
from the outset.

If you look at Atom's behavior, it actually shows regexp search results 
in a pane below the main area. The same direction where you want to show 
the definitions search result. Just something to keep in mind.

>> To take VS Code as an example (I just to see how it behaves exactly),
>> a search for references opens search results in the sidebar.
> 
> Emacs has side windows too.

You mean like Speedbar? That's the part which I didn't exactly like.

>> Whereas for definitions they have both "Go To Definition" and "Peek
>> Definition". The latter shows the definitions kind of inline, in
>> a not-exactly-a-popup kind of way
>> (https://stackoverflow.com/questions/55599177/go-to-definition-in-vscode-preview-window-ruins-the-edito),
>> and there, if you type RET, that triggers navigation to the selected
>> definition. "Go To Definition", when there are several definitions, also
>> switches to "Peek" mode by default.
>>
>> Not sure how best to implement this different kind of display in Emacs, but
>> the idea makes a lot of sense to me.

BTW, there's a third-party package that implements something like that 
for LSP users: https://github.com/emacs-lsp/lsp-ui#lsp-ui-peek

Not sure how likely we are to have this contributed to the core, though.

>> In Sublime, IIRC, for this they used the dropdown from their
>> top-of-the-window command line, the same one that becomes active once one
>> presses Ctrl-P.
> 
> We have Completions for the same purpose.

Except we have a UI for it which is expected to be usable without using 
arrow keys. And the completion entries in this case can contain spaces, 
parens, and basically any other characters. They can also be fairly 
long. So completing-read doesn't seem to fit the bill.

I'm open to ideas.





  reply	other threads:[~2019-05-15 22:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 20:53 bug#35737: xref--original-command Juri Linkov
2019-05-15  1:07 ` Dmitry Gutov
2019-05-15 21:04   ` Juri Linkov
2019-05-15 22:30     ` Dmitry Gutov [this message]
2019-05-16 19:58       ` Juri Linkov
2019-05-24  1:59         ` Dmitry Gutov
2019-05-24 18:40           ` Juri Linkov
2019-05-24 22:48             ` Dmitry Gutov
2019-05-27 19:59               ` Juri Linkov
2019-05-27 21:13                 ` Dmitry Gutov
2019-05-27 23:21                   ` Dmitry Gutov
2019-05-28  2:41                   ` Eli Zaretskii
2019-05-28  7:46                     ` Dmitry Gutov
2019-05-28 15:01                       ` Eli Zaretskii
2019-05-28 20:30                   ` Juri Linkov
2019-05-30 17:33                     ` Dmitry Gutov
2019-06-09 23:44                     ` 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=f56983ad-a439-15cd-3651-449dcad6ab6d@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=35737@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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.