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

mu4e-org: autoload org-link-set-parameters #2798

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

josephmturner
Copy link
Contributor

With this change, mu4e: links now load mu4e if it wasn't loaded already.

@josephmturner
Copy link
Contributor Author

Ping :)

With this change, mu4e: links now load mu4e if it wasn't loaded already.
@josephmturner
Copy link
Contributor Author

rebased on master

@djcb djcb merged commit 8cca957 into djcb:master Jan 23, 2025
2 checks passed
@djcb
Copy link
Owner

djcb commented Jan 23, 2025

Merged, thanks.

@josephmturner josephmturner deleted the fix/autoload-mu4e-org branch January 23, 2025 07:35
@wavexx
Copy link
Contributor

wavexx commented Jan 23, 2025

This causes a call to (org-link-set-parameters) when loaddefs.el is loaded, which is not what we want.. this is causing an init failure for me.

@djcb
Copy link
Owner

djcb commented Jan 23, 2025

@wavexx disabled the change for now. What exact error did you get?

@wavexx
Copy link
Contributor

wavexx commented Jan 23, 2025

Attempting to call underfined (org-link-set-parameters) while loading loaddefs.el. Which makes sense, since this cookie is just putting the call into loaddefs, but the definition is not available yet.

mu4e-org.el should require 'ol to make org-link-set-parameters defined instead.

@josephmturner
Copy link
Contributor Author

I am sorry to inconvenience you, @wavexx! Thank you for reporting the issue, and thank you for reverting my mistake so quickly @djcb!!

I am able to reproduce the issue by checking out 62e4b07 (just before this PR was reverted), then generating mu4e-autoloads.el by running M-x package-vc-install-from-checkout. Then if I run emacs -Q --eval "(load \"/home/joseph/.local/src/mu/mu4e/mu4e-autoloads.el\")", I get the same error load-with-code-conversion: Symbol’s function definition is void: org-link-set-parameters.

Adding (require 'ol) to mu4e-org.el does not solve the issue. mu4e-org.el already requires org.el, which in turn requires ol.el.

I think the solution is for org-link-set-parameters to be autoloaded inside ol. I have submitted a patch to the Org mode mailing list. If it is applied, it will only be available in org 9.7.21. @djcb how would you like to handle this feature which will require a bleeding edge of org? Or perhaps you have another solution? :)

Thank you!

Joseph

@djcb
Copy link
Owner

djcb commented Jan 26, 2025

@josephmturner we can add the autoload then when the fix is available in the minimum emacs version supported by mu4e... which is currently 26.x (at least officially).

Or perhaps there's some different way, but it seems like a fairly minor thing (at least for me).

@josephmturner
Copy link
Contributor Author

we can add the autoload then when the fix is available in the minimum emacs version supported by mu4e... which is currently 26.x (at least officially).

Sounds good to me. Shall I make a new issue as a reminder for then?

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.

3 participants