-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function location of spacemacs/ functions is missing #3430
Comments
Technically, that function is not defined where you think it is, because the defun in inside another defun (the init function), which is not called right away. This is probably the reason emacs is not "finding it". There are a couple of ways to correct this, but I'm not sure what (if anything) @syl20bnr will want to do about it. |
This is the case when the functions are defined by macros, Emacs does not go to the macro location. This can confuse the user. Not much we can do on our side except explicitly define the functions outside of a macro which is not practical in most cases depending on the usefulness of the macro (I.e. How many times it is really used ?). |
What if we use some naming policy for macros functions, so users can distinguish macros and regular functions? For example, |
You mean functions created in macros as opposed to functions created normally? I don't see that adding much value. (And it's verbose as hell.) If you mean a naming policy for macros, we have that already. I think this is just something we have to live with. It's Emacs' problem. |
Here's a simple way to change the way functions are defined so that they are discoverable (defun spacemacs/init-foo ()
(use-package foo
:config
(require 'spacemacs-foo-funcs))) In "layers/+distribution/spacemacs/extra-funcs/spacemacs-foo-funcs.el": (defun spacemacs/foo-do-bar ()) |
Is this issue a |
@syl20bnr Up |
justbur's way sounds good to me, I've always faced issues when functions are defined inside |
Sorry for the spam, but I want to voice my support for this issue. Quick access to help and easy navigation into the code depths are one of the reasons emacs is great. It's also much easier to contribute to projects where the source code is easily navigable. Meanwhile For discoverability: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
yeah |
Let's keep this open? This is still an issue and would be better if all code becomes navigable with standard emacs tooling. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Mmhhh do we still have this issue ? We moved all the functions to |
Not able to reproduce at current develop branch. |
When you describe-function a function that spacemacs defines, the link in the help buffer points to the wrong location.
Example:
spacemacs/helm-project-smart-do-search-region-or-symbol is an interactive Lisp function in
init.el'.`A click on
init.el
leads to the spacemacs initialization file instead of the line where the function is defined (which is the behaviour for normal emacs functions).The text was updated successfully, but these errors were encountered: