unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Helmut Eller <eller.helmut@gmail.com>,
	emacs-devel@gnu.org
Subject: xref "find references" and grouping
Date: Sat, 2 May 2015 16:13:53 +0300	[thread overview]
Message-ID: <5544CD91.2050301@yandex.ru> (raw)
In-Reply-To: <jwv383fiigr.fsf-monnier+emacsbugs@gnu.org>

On 05/02/2015 09:59 AM, Stefan Monnier wrote:

> I don't see much need for nesting.  I think the issue is mostly one of
> sorting in *xref* (or in the cycling, if we were to use a hypothetical
> other UI that provides functionality like the old etags.el).

Take a look at M-x semantic-symref output, and compare to what we have 
with M-x xref-find-references. Here's a screenshot of the former:

http://cedet.sourceforge.net/img-gen/symref.png

Note the grouping by the "current function", as well as by file name. It 
seems to me that it can be pretty valuable.

Here's how a similar interface looks in a popular proprietary IDE: 
https://www.jetbrains.com/img/webhelp/idea/findUsageField.png

Helmut, any suggestions? Does SLIME have anything related?

> So, let's focus on this.
> My suggestion would be either:
> - make xref-find-function return not just a list of locations, but also
>    an indication whether they're pre-sorted or not.
> - make xref-find-function return not a list of locations, but a list of
>    lists of locations (i.e. every location inside a sub-list is
>    considered to have the same "level/quality/likelihood", but the lists
>    are sorted by their "level/quality/likelihood").
> - let the backend provide its own sorting function to override the
>    current "group by file" sorting.

The question of sorting would need resolving indeed.

> Basically, I think the focus should be on making sure that we can
> re-implement the old behavior on top of the new API when using the
> xref/etags backend.

We also can't group xref-find-apropos matches by likelihood, I think. Or 
would you include file path on each line? That seems wasteful.



  parent reply	other threads:[~2015-05-02 13:13 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83zja6b3tc.fsf@gnu.org>
     [not found] ` <54A24079.4020902@yandex.ru>
     [not found]   ` <m261ctczy1.fsf@gmail.com>
     [not found]     ` <54A2FF47.6010207@yandex.ru>
     [not found]       ` <m2h9wcwxrp.fsf@gmail.com>
     [not found]         ` <54A86135.7080004@yandex.ru>
     [not found]           ` <54A90002.7080009@gmx.at>
     [not found]             ` <54A9C3FB.7000602@yandex.ru>
     [not found]               ` <54AA3881.3080304@gmx.at>
     [not found]                 ` <54ABBB47.7010603@yandex.ru>
     [not found]                   ` <837fszx7iy.fsf@gnu.org>
     [not found]                     ` <jwv618iqjvj.fsf-monnier+emacsbugs@gnu.org>
     [not found]                       ` <83r3r5wqwv.fsf@gnu.org>
     [not found]                         ` <jwvvbgh5vve.fsf-monnier+emacsbugs@gnu.org>
     [not found]                           ` <83k2wxwexb.fsf@gnu.org>
     [not found]                             ` <jwvoam9459c.fsf-monnier+emacsbugs@gnu.org>
     [not found]                               ` <83fv7kwbow.fsf@gnu.org>
2015-04-29  2:41                                 ` UI inconveniences with M- Stefan Monnier
2015-04-29  6:10                                   ` Helmut Eller
2015-04-29 13:23                                     ` conflicting uses of next-error-function (was: UI inconveniences with M-.) Stefan Monnier
2015-04-29 16:58                                       ` conflicting uses of next-error-function Helmut Eller
2015-04-29 17:40                                         ` Dmitry Gutov
2015-04-29 18:15                                           ` Helmut Eller
2015-04-29 23:14                                             ` Dmitry Gutov
2015-04-30  6:19                                               ` Helmut Eller
2015-04-30  8:04                                                 ` Dmitry Gutov
2015-04-30 17:46                                                   ` Helmut Eller
2015-05-02 23:20                                                     ` Dmitry Gutov
2015-05-03  6:54                                                       ` Helmut Eller
2015-05-03 11:45                                                         ` Dmitry Gutov
2015-05-03 13:25                                                           ` Helmut Eller
2015-05-03 14:12                                                             ` Dmitry Gutov
2015-05-04 22:21                                                               ` Ted Zlatanov
2015-05-05  2:28                                                                 ` Dmitry Gutov
2015-05-05  9:47                                                                   ` Ted Zlatanov
2015-05-05 14:05                                                                     ` Dmitry Gutov
2015-05-05 14:26                                                                       ` Ted Zlatanov
2015-04-29 23:05                                       ` Vitalie Spinu
2015-04-29 23:11                                         ` Dmitry Gutov
2015-04-29 23:52                                           ` Vitalie Spinu
2015-04-29 23:15                                       ` Dmitry Gutov
2015-04-30  6:35                                         ` Stefan Monnier
2015-04-29 15:26                                     ` UI inconveniences with M- Vitalie Spinu
2015-04-30  0:44                                       ` Dmitry Gutov
2015-04-30  0:55                                         ` Vitalie Spinu
2015-04-29 17:08                                     ` Dmitry Gutov
2015-04-29 15:44                                   ` Eli Zaretskii
2015-04-29 15:57                                     ` Dmitry Gutov
2015-04-29 16:17                                       ` Eli Zaretskii
2015-04-29 16:25                                         ` Dmitry Gutov
2015-04-29 16:53                                           ` Eli Zaretskii
2015-04-29 17:06                                             ` Dmitry Gutov
2015-04-29 17:15                                               ` Eli Zaretskii
2015-04-29 17:26                                                 ` Dmitry Gutov
2015-04-29 17:59                                                   ` Eli Zaretskii
2015-04-29 18:10                                                     ` Dmitry Gutov
2015-04-29 21:54                                     ` Stefan Monnier
2015-04-30 13:42                                       ` Eli Zaretskii
2015-05-01 14:21                                         ` Stefan Monnier
2015-05-01 18:32                                           ` Eli Zaretskii
2015-05-01 21:04                                             ` Stefan Monnier
2015-05-01 21:13                                               ` Dmitry Gutov
2015-05-02  7:00                                                 ` Stefan Monnier
2015-05-02  7:18                                               ` Eli Zaretskii
2015-05-02  8:35                                           ` Fumitaka Tokumitsu
2015-05-01 21:11                                         ` Dmitry Gutov
2015-05-02  8:12                                           ` Eli Zaretskii
2015-05-02  8:46                                             ` Fumitaka Tokumitsu
2015-05-02 12:41                                             ` Dmitry Gutov
2015-05-02 12:57                                               ` Eli Zaretskii
2015-05-02 13:31                                                 ` Dmitry Gutov
2015-05-02 13:44                                                   ` Eli Zaretskii
2015-05-02 17:44                                                     ` Dmitry Gutov
2015-05-02  8:26                                   ` Fumitaka Tokumitsu
     [not found]                             ` <553EB9D7.7010002@yandex.ru>
     [not found]                               ` <jwvd22p2mfh.fsf-monnier+emacsbugs@gnu.org>
     [not found]                                 ` <553EC576.70903@yandex.ru>
     [not found]                                   ` <jwviochrqkt.fsf-monnier+emacsbugs@gnu.org>
     [not found]                                     ` <553EE468.4070203@yandex.ru>
     [not found]                                       ` <jwvlhhcqt3q.fsf-monnier+emacsbugs@gnu.org>
     [not found]                                         ` <553FF5DA.4090408@yandex.ru>
2015-04-29  3:13                                           ` Stefan Monnier
2015-04-29  3:25                                             ` Dmitry Gutov
2015-04-29  4:15                                               ` Stefan Monnier
     [not found]                           ` <553EBBBF.6070509@yandex.ru>
     [not found]                             ` <838udcwbdc.fsf@gnu.org>
     [not found]                               ` <553FFC99.5080701@yandex.ru>
     [not found]                                 ` <834mnzuedd.fsf@gnu.org>
     [not found]                                   ` <554161A8.30202@yandex.ru>
     [not found]                                     ` <83618du3q3.fsf@gnu.org>
     [not found]                                       ` <5542E486.2010107@yandex.ru>
     [not found]                                         ` <83k2wsssm8.fsf@gnu.org>
     [not found]                                           ` <5543632C.6000306@yandex.ru>
     [not found]                                             ` <834mnwsbfb.fsf@gnu.org>
     [not found]                                               ` <554392E2.7080109@yandex.ru>
     [not found]                                                 ` <83oam4qh2u.fsf@gnu.org>
     [not found]                                                   ` <5543C97C.6050000@yandex.ru>
     [not found]                                                     ` <83h9rwqf10.fsf@gnu.org>
     [not found]                                                       ` <5543E3CF.5010402@yandex.ru>
2015-05-02  6:59                                                         ` Stefan Monnier
2015-05-02  7:59                                                           ` Helmut Eller
2015-05-02  8:39                                                             ` Eli Zaretskii
2015-05-02  9:09                                                               ` Helmut Eller
2015-05-02  9:24                                                                 ` Eli Zaretskii
2015-05-02  9:50                                                                   ` Helmut Eller
2015-05-02 18:29                                                             ` Dmitry Gutov
2015-05-02 13:13                                                           ` Dmitry Gutov [this message]
2015-05-02 14:14                                                             ` xref "find references" and grouping Helmut Eller
2015-05-02 19:01                                                               ` Dmitry Gutov
2015-05-03  7:47                                                                 ` Helmut Eller
2015-05-04  1:35                                                                   ` Stefan Monnier
2015-05-04  2:09                                                                   ` Dmitry Gutov
2015-05-04 13:10                                                                     ` Vitalie Spinu
2015-05-04 14:21                                                                       ` Vitalie Spinu
2015-05-04 21:29                                                                       ` Dmitry Gutov
2015-05-05  0:02                                                                         ` Vitalie Spinu
2015-05-05  0:18                                                                           ` Dmitry Gutov
2015-05-05  1:45                                                                             ` Vitalie Spinu
2015-05-02 19:10                                                           ` UI inconveniences with M- Dmitry Gutov
2015-05-04 13:41                                                           ` Vitalie Spinu
2015-05-04 21:34                                                             ` Dmitry Gutov
2015-05-05  0:13                                                               ` Vitalie Spinu
2015-05-05  0:14                                                                 ` Dmitry Gutov
2015-05-05  1:36                                                                   ` Vitalie Spinu
2015-05-05 15:06                                                                     ` Dmitry Gutov
     [not found]                       ` <83pp6pwqnw.fsf@gnu.org>
     [not found]                         ` <jwv1tj57b9o.fsf-monnier+emacsbugs@gnu.org>
     [not found]                           ` <553EB74A.4030208@yandex.ru>
     [not found]                             ` <jwvoam92niy.fsf-monnier+emacsbugs@gnu.org>
     [not found]                               ` <83618gwbb1.fsf@gnu.org>
2015-04-29  3:12                                 ` Etags.el (was: UI inconveniences with M-.) Stefan Monnier
2015-04-29 15:52                                   ` Eli Zaretskii
2015-04-29 22:14                                     ` Etags.el Stefan Monnier

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=5544CD91.2050301@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).