unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: William Xu <william.xwl@gmail.com>, emacs-devel@gnu.org
Subject: Re: Xref completion
Date: Sat, 5 Dec 2020 23:02:30 +0200	[thread overview]
Message-ID: <c2c367b1-84fb-2c91-d8fe-bdcda5c5d058@yandex.ru> (raw)
In-Reply-To: <m2ft4kwiio.fsf@gmail.com>

On 05.12.2020 14:21, William Xu wrote:
> Dmitry Gutov <dgutov@yandex.ru> writes:
> 
>> I've pushed it now with some changes, hope you all like the result.
>>
>> Shortening the group part (in most common cases) is among them.
>>
>> Also added some highlighting with corresponding xref faces. It now
>> looks closer to Pierre's original screenshot.
> 
> The result looks nice.

Thanks.

>> Removed the bit of logic that hid the summaries when they are
>> technically unnecessary because in my testing it made completion
>> slightly less useful by hiding information (sorry).
> 
> If the summary contains different info, like the actual line from the
> group (in case it is a file), that may be useful to show it, for
> example:
> 
> /foo.cpp:40:struct Foo : Bar
> /foo2.cpp:42:struct Foo : Foo2

That's how it usually looks in my testing, with the etags backend. E.g.:

Possible completions are:
dispextern.h:2703:  int vpos;
indent.h:29:    EMACS_INT vpos;
window.h:97:  int hpos, vpos;

(After I try to navigate to the definitions 'vpos' from xdisp.c:1499).

Of course, in the end it depends on each backend to put useful into into 
summaries. And in the case of etags, that depends on how the definition 
is written (that the identifier is not alone on its line).

> However, at the moment it only shows the same summary info for each
> line, which doesn't seem really useful:
> 
> /foo.cpp:40:Foo
> /foo2.cpp:42:Foo

Which backend is this? Also etags?

> Or one can also just add this info into the reading prompt:
>      (format "Jump to definition of `%s': " summary)

I suppose it could be a special case, but we'd have to pipe through the 
initial input as well (it's not currently available). So hopefully there 
is some better solution.



  reply	other threads:[~2020-12-05 21:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 18:13 Xref completion Pierre Neidhardt
2020-11-17 18:22 ` [SPAM UNSURE] " Stephen Leake
2020-11-17 18:32   ` Pierre Neidhardt
2020-11-17 18:46   ` Basil L. Contovounesios
2020-11-17 18:38 ` Eli Zaretskii
2020-11-17 19:11   ` Pierre Neidhardt
2020-11-17 19:27 ` Juri Linkov
2020-11-17 20:00   ` Dmitry Gutov
2020-11-17 21:16   ` William Xu
2020-11-17 21:38     ` Dmitry Gutov
2020-11-18  7:35       ` William Xu
2020-11-18 13:46         ` Dmitry Gutov
2020-11-18 18:53           ` William Xu
2020-11-18 19:22             ` Dmitry Gutov
2020-11-18 20:39               ` Juri Linkov
2020-11-19  1:34                 ` Dmitry Gutov
2020-11-18 18:47         ` João Távora
2020-11-19  1:43           ` Dmitry Gutov
2020-11-19  8:19             ` William Xu
2020-11-19 13:30               ` Dmitry Gutov
2020-12-02 21:44               ` Juri Linkov
2020-12-03  0:25                 ` Dmitry Gutov
2020-12-03 21:09                   ` Juri Linkov
2020-12-05  1:12                     ` Dmitry Gutov
2020-12-05 12:21                       ` William Xu
2020-12-05 21:02                         ` Dmitry Gutov [this message]
2020-12-06  8:30                           ` William Xu
2020-12-06 11:00                             ` Dmitry Gutov
2020-12-06 14:00                               ` William Xu
2020-12-06 21:01                                 ` Dmitry Gutov
2020-12-05 19:52                       ` Juri Linkov
2020-12-05 21:44                         ` Dmitry Gutov
2020-12-06 20:46                           ` Juri Linkov
2020-12-06 21:20                             ` Dmitry Gutov
2020-12-06 21:34                               ` Juri Linkov
2020-12-06 21:40                                 ` Dmitry Gutov
2020-12-07  9:27                       ` Daniel Martín
2020-12-07 15:12                         ` jixiuf
2020-12-07 21:57                           ` Dmitry Gutov
2020-12-07 21:53                         ` 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=c2c367b1-84fb-2c91-d8fe-bdcda5c5d058@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=william.xwl@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 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).