all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: unifying emacs "go to definition" functionality
Date: Wed, 20 Feb 2013 09:52:06 +0100	[thread overview]
Message-ID: <m2ehgbz7t5.fsf@gmail.com> (raw)
In-Reply-To: CADOO-JyPRaXWLvh0U3XE+H2pQbO8dbEOqL1CKw7mRs5j_1nRoQ@mail.gmail.com

On Wed, Feb 20 2013, Brendan Miller wrote:

> 5. SLIME uses etags keybindings, but I don't think it uses etags stack.

SLIME does use the etags stack but with different keybindings.  We use
M-. to push and M-, to pop.  M-* is bound to the same command as M-, for
compatibility but most people prefer M-, because , and . are adjacent on
their keyboards and M-* is usually quite hard to type.

I think M-, is the better choice and it should be the standard.

[...]
> I'd be interested in taking a look at the implementation work behind
> this in the future, but initially I just wanted to put the idea out
> there for feedback.

Using the etags stack is pretty easy.  A more difficult problem is how
to deal with names that have multiple definitions or definitions that
have multiple source locations.  E.g. in Emacs Lisp a variable and a
function can have the same name or in C a function can have a prototype
definition in a .h file and the actual definition is a .c file.  This
problem is especially important with languages that have multiple
methods with the same name.

In SLIME, when a name has multiple definitions we display all
definitions (one per line with some context) in a special buffer and the
user must then choose which one he wants (the next/previous-line
commands in that buffer automatically displays the source of the current
definition in the other buffer).

The autocomplete package uses something like a menu for this problem.

etags jumps to the first candidate and provides something like
next/previous-definition commands, but I think that solution is very
hard to use.  At least it drives me nuts, because I never know how many
more definitions there are and I can't remember the key bindings.

Helmut




  parent reply	other threads:[~2013-02-20  8:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20  0:28 unifying emacs "go to definition" functionality Brendan Miller
2013-02-20  3:00 ` Stefan Monnier
2013-02-20  4:54 ` Dmitry Gutov
2013-02-20  6:59 ` Andreas Röhler
2013-02-20 13:44   ` Dmitry Gutov
2013-02-20  8:52 ` Helmut Eller [this message]
2013-02-20  9:07   ` Andreas Schwab
2013-02-20  9:28     ` Helmut Eller
2013-02-20  9:36       ` Andreas Schwab
2013-02-20  9:45         ` Helmut Eller
2013-02-20 13:51         ` Stefan Monnier
2013-02-20  9:59   ` Lawrence Mitchell
2013-02-20 10:21     ` Jambunathan K
2013-02-20 10:40       ` Jambunathan K
2013-02-20 15:21     ` Drew Adams

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=m2ehgbz7t5.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --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.