From: "Daniel Martín" <mardani29@yahoo.es>
To: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Consistency for xref-show-{xrefs,definitions}-function
Date: Thu, 14 Jan 2021 22:04:38 +0100 [thread overview]
Message-ID: <m1mtxb6xi1.fsf@yahoo.es> (raw)
In-Reply-To: <CH2PR01MB5879698CCD7670BFB29E4FE88BA80@CH2PR01MB5879.prod.exchangelabs.com> (Gabriel do Nascimento Ribeiro's message of "Thu, 14 Jan 2021 17:27:27 -0300")
Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com> writes:
> I noticed that the options 'xref-show-xrefs-function' and
> 'xref-show-definitions-function' are not symmetrical.
>
> The defcustom for 'xref-show-xrefs-function' does not have type choices
> as 'xref-show-definitions-function' has. Furthermore, it's quite strange
> to configure it as follow:
>
> (setq xref-show-xrefs-function
> 'xref-show-definitions-completing-read)
>
> I suggest to create similar functions for 'xref-show-xrefs-function',
> which at this moment can be just aliases but can be independent
> functions in the future, if necessary:
> - xref-show-xrefs-buffer
> - xref-show-xrefs-buffer-at-bottom
> - xref-show-xrefs-completing-read
>
I agree with your viewpoint, but do we need that much complexity? IIUC,
those functions mainly receive a list of xrefs and present them in a
certain way. I'm not sure why we should have xref-show-xrefs-* and
xref-show-definitions-* (even if they are aliases). I feel this
duplication won't scale well (imagine if we add support for any other
code relationship to xref).
Could we have a single implementation for each presentation style? That
would reduce confusion, and xref-show-xrefs-function and
xref-show-definitions-function may have different defaults to provide
the best possible UX for each operation.
next prev parent reply other threads:[~2021-01-14 21:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 20:27 Consistency for xref-show-{xrefs,definitions}-function Gabriel do Nascimento Ribeiro
2021-01-14 21:04 ` Daniel Martín [this message]
2021-01-15 17:20 ` Dmitry Gutov
2021-01-16 18:35 ` Gabriel do Nascimento Ribeiro
2021-01-16 19:24 ` Dmitry Gutov
2021-01-16 20:31 ` Gabriel do Nascimento Ribeiro
2021-01-18 1:28 ` 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
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=m1mtxb6xi1.fsf@yahoo.es \
--to=mardani29@yahoo.es \
--cc=emacs-devel@gnu.org \
--cc=gabriel376@hotmail.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 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).