Skip to content
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

Add describe evil ex-command functionality #14634

Merged

Conversation

dalanicolai
Copy link
Contributor

For introspection purposes it can be nice to have this functionality. Also this
function can be used to get an overview of which ex-commands are available.

Copy link
Contributor

@Kazark Kazark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slick

@dalanicolai
Copy link
Contributor Author

Haha! Yeah it is a funny one...

@dalanicolai
Copy link
Contributor Author

Probably quite unnecessary to refer to the already closed request #5577

func))
(if (stringp func)
(spacemacs/describe-ex-command func)
(describe-function func)))))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If helpful layer is enabled, we can use (helpful-callable func) instead of (describe-function func).
The output is much more readable.

Copy link
Contributor Author

@dalanicolai dalanicolai Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out, I have added it. On the other hand, the helpful layer could make describe-function an alias for helpful-callable (and document it is aliased by the helpful layer in the docstring). Although that would probably be useful only for this single function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it an alias, also keeps the ivy-actions available. Right now, with the helpful layer, I loose the ivy actions Info and definition (which I use all the time) when using SPC h d f.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, I already had a personal helpful layer, where I bound the helpful function under SPC h h f (etc.) , which is an alternative solution. The command is not called describe-function anymore, but helpful-callable, so that made more sense to me...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote to change those bindings in the helpful layer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or provide a configuration variable like helpful-prefer-alias

For introspection purposes it can be nice to have this functionality. Also this
function can be used to discover which ex-commands are available.
Copy link
Collaborator

@smile13241324 smile13241324 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@smile13241324
Copy link
Collaborator

Hmmm not a bad idea about the alias in helpful layer, we just need to make sure to add the new third parameter to the alias call otherwise this will break emacs 28 again.

@smile13241324 smile13241324 merged commit b3c7829 into syl20bnr:develop Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants