all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Weiner <rswgnu@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: xref rocks!
Date: Tue, 26 Apr 2016 23:35:33 -0400	[thread overview]
Message-ID: <CA+OMD9gVFbWRcr86wNXC5t4OhbanjLv3r1WwjsXGiO+KNWx0Eg@mail.gmail.com> (raw)
In-Reply-To: <cdcad077-e439-89a7-286b-b6d9d51307b0@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]

On Tue, Apr 26, 2016 at 4:41 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 04/26/2016 08:12 PM, Robert Weiner wrote:
>
> One thing that would help would be better
>> separation between finding xrefs (which should just return lists of
>> them) and displaying xrefs.  For example, I went looking for a generic
>> xref equivalent to find-tag-noselect and the only thing I found was
>> something specific to elisp tags.
>>
>

> Are you looking for
>
>    (xref-backend-definitions (xref-find-backend) "car")
>

Yes, that is helpful.  So why not include a wrapper for the API of
something like:
   (xref-get-definitions "car")


>
> Also, there seem to be many functions that just call a single other
>> functions, creating a deeply nested tree of calls.  Is there a way to
>> simplify that?
>>
>
> Could you give an example?


xref-find-definitions calls only xref--find-definitions which calls
only xref--find-xrefs which essentially calls only xref--show-xrefs.


>
> I also see that about a year ago there was a call for documenting
>> xref.el.  Has any progress been made on that?  Even though things will
>> change, writing the documentation will give you a base that you can
>> adapt as the library evolves and will help people to provide further
>> feedback.
>>
>
> There is an introduction in Commentary at the top of xref.el. You can read
> it, among other ways, using `M-x describe-package RET xref RET'.
>

I have read it.  It certainly points to many places in the package and in
the backend implementations to look for more documentation but doesn't give
a sense of how to use the package after defining a backend, i.e. what
commands are available and what parameters do they require, or for
programmers, what do the resulting API calls look like?  Including a simple
sample backend, much simpler than referencing the existing backends, would
also help a lot to show the minimum involved in creating a backend.  Think
of someone who knows Elisp and Emacs but knows nothing about xrefs.  Can
you tell them 1. how to utilize existing backends and 2. how to create a
backend in some detail.

Just some thoughts.

Bob

[-- Attachment #2: Type: text/html, Size: 3894 bytes --]

  reply	other threads:[~2016-04-27  3:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 11:35 xref rocks! Nicolas Petton
2016-04-25 20:57 ` Dmitry Gutov
2016-04-25 21:05   ` Nicolas Petton
2016-04-26 17:12   ` Robert Weiner
2016-04-26 20:41     ` Dmitry Gutov
2016-04-27  3:35       ` Robert Weiner [this message]
2016-04-27 13:13         ` Dmitry Gutov
2016-04-27 15:58           ` Robert Weiner
2016-04-26 14:49 ` John Wiegley
2016-04-26 20:29   ` 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=CA+OMD9gVFbWRcr86wNXC5t4OhbanjLv3r1WwjsXGiO+KNWx0Eg@mail.gmail.com \
    --to=rswgnu@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /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.