unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Josh <josh@foxtail.org>
Cc: ams@gnu.org, emacs-devel <emacs-devel@gnu.org>
Subject: Re: emacs-lisp-mode and find-tag
Date: Fri, 20 Jun 2014 13:35:07 -0400	[thread overview]
Message-ID: <jwv61jvo6c7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CANdFEAH_XRGGMjp5PE5MQGamXxORVM=OZhtr_A7SideJt2sDhg@mail.gmail.com> (josh@foxtail.org's message of "Fri, 20 Jun 2014 09:52:41 -0700")

> +1.  There was a discussion[0] about this topic last year and
> apparent agreement in principle, but the details are yet to be
> worked out.  At least two implementations exist already, one
> being the patch Leo submitted with that bug and the other being
> the `elisp-slime-nav' package I mentioned in that thread (and
> whose author has also assigned copyright).

Both of those provide navigation commands for Elisp, yes.

I'm more interested in introducing generic code, which relies on
a `find-tag-function` hook to do the work of finding the definition.

> If we do define a standard set of source navigation key bindings,
> I hope it includes one for jumping to symbols' references.  Unlike
> M-. for jumping to definitions, jumping to references doesn't seem
> to have a standard binding, even though it's often very handy.

Indeed.  In general, we need a hooks

  `find-tag-definition-functions`
  This should hold functions of one argument (a string): it should
  return a list of the form (BUFFER-OR-FILE POSITION NEXT) where
  POSITION can be either a position in a buffer (integer/marker) or
  a pair (LINE . COLUMN) where COLUMN can be nil.  NEXT if non-nil could
  be a function which will return the same info but for the
  next definition.  Of course both can return nil.

Then we need generic code which uses this function to provide the
M-. and M-* functionality, plus glue code for etags.el (which should get
us back the exact same functionality we have now).  Then we can start
adding more glue code for other backend: find-function, imenu, semantic,
...

And yes, we can add also a find-tag-definition-functions.  As well as
hooks to get a quick summary (tho we could maybe just use
eldoc-documentation-function) and another to get the "full" doc.


        Stefan



  reply	other threads:[~2014-06-20 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 12:32 emacs-lisp-mode and find-tag Alfred M. Szmidt
2014-06-20 13:08 ` Eli Zaretskii
2014-06-20 15:52   ` Alfred M. Szmidt
2014-06-20 14:30 ` Stefan Monnier
2014-06-20 15:52   ` Alfred M. Szmidt
2014-06-20 16:24     ` Stefan Monnier
2014-06-20 16:52     ` Josh
2014-06-20 17:35       ` Stefan Monnier [this message]
2014-06-20 18:53         ` Ivan Kanis
2014-06-20 19:07           ` Josh
  -- strict thread matches above, loose matches on Subject: below --
2014-06-20 20:22 Barry OReilly
2014-06-21  1:08 ` 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=jwv61jvo6c7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=josh@foxtail.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 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).