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 support for following and storing org "help" links #304

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

DamienCassou
Copy link
Contributor

Closes #38

@Wilfred Wilfred merged commit 2f525ca into Wilfred:master Dec 1, 2022
@Wilfred
Copy link
Owner

Wilfred commented Dec 1, 2022

Thanks.

;; helpful are loaded. To avoid using `eval-after-load' (which is
;; only recommended in user init files), the function is called each
;; time the major mode is used.
(helpful--add-support-for-org-links))
Copy link

@minad minad Dec 1, 2022

Choose a reason for hiding this comment

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

The registration is not ideal. Calling the registration on every mode invocation is worse than using with-eval-after-load. The recommendation shouldn't be followed always, in fact it is harmful here. It leads to an actual initialization problem - as long as no helpful buffer has been created, help links are not registered for helpful.

To fix this it is sufficient to perform the registration in an with-eval-after-load 'org block in helpful.el at the toplevel. If the user wants to use helpful directly for Org help links they should then add (with-eval-after-load 'org (require 'helpful)) to their config. If loading helpful always with org is considered too heavy one could create a separate file helpful-ol, which doesn't directly load helpful. See my osm-ol package as an example: https://github.com/minad/osm/blob/main/osm-ol.el

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'm fine implementing that if @Wilfred agrees.

@DamienCassou DamienCassou deleted the support-org-help-links branch December 2, 2022 07:04
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.

Add support for org links
3 participants