Open seagle0128 opened 6 years ago
elisp-def
handles local variables, package references and interactively defined functions. elisp-def
and xref
both handle global definitions. README.md has examples of code snippets that only elisp-def
can help you with.
elisp-slime-nav
is a thin wrapper around xref
these days, with some great keybindings.
Regarding (use-package elisp-ref)
, do you have a package installed with that name? I know of elisp-def
and elisp-refs
, but no elisp-ref
.
It's also worth confirming that you're calling the correct command. M-x .
is not a standard Emacs keybinding. I suggest you try calling elisp-def
directly to confirm it's working correctly.
All that elisp-def-mode
does is set up the keybindings M-.
and M-,
.
Sorry, my typo. I corrected.
I use (use-package elisp-refs)
and install elisp-refs
. M-.
cannot find the package or file correctly.
I can't reproduce I'm afraid.
Have you tried M-x elisp-def
? What does C-h k M-.
show?
Let me provide a screenshot for the example.
I got the error: Couldn’t identify where eldoc is defined
.
Thanks, that's helpful.
I have an idea what this might be. Since elisp-def
expands macros, if use-package
hasn't been loaded yet then this won't work.
If you do M-: (require 'use-package)
and try again, do it work?
No, it doesn't unfortunately.
That's really odd. OK, does elisp-def
work when you run it on an explicit require
call? If you have an elisp buffer with the contents:
(require 'eldoc)
does M-x elisp-def
on the eldoc
work?
I am back to this topic now. Sorry for missing this.
It works better now. But I am still confused, what's the advantage of elisp-def
than xref
? xref
works well for me and it's built-in. If people don't understand the advantages people don't choose it.
What's the difference among
elisp-def
,elisp-slime-nav
andxref
, please? It seemselisp-def
is unable to handle the case ofuse-package
.e.g.
M-.
is unable to jump toelisp-refs.el
.