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] Fallback to loading mu4e-autoloads if package not activated #16934

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bcc32
Copy link
Collaborator

@bcc32 bcc32 commented Apr 1, 2025

Fix #16931.

Rather than just reverting the previous change and loading mu4e at
startup, just load its autoloads. Warn if they were not already
loaded by package-activate, to encourage users to fix issues in
their Emacs site-lisp distribution or report issues to their
distribution maintainers.

@fnussbaum
Copy link
Collaborator

As in the factor case, some distributions (I noticed this on Ubuntu 22.04) do not even provide the autoloads file. Should we fall back to eager loading in that case? Or display a different warning, perhaps even mentioning how to generate missing autoloads: (loaddefs-generate mu4e-installation-path "mu4e-autoloads.el").

@bcc32
Copy link
Collaborator Author

bcc32 commented Apr 2, 2025

If the distribution does not provide the autoloads file, it's unlikely the user can generate the missing autoloads with loaddefs-generate (usually the install directories will be read-only, right? It's actually been a long time since I regularly used a non-NixOS Linux distribution so I don't know off-hand).

@fnussbaum
Copy link
Collaborator

fnussbaum commented Apr 2, 2025

Ah indeed, one would need to do something like (find-file mu4e-installation-path) and SPC f E first, only then loaddefs-generate succeeds.

(Of course, this only works with root access, so perhaps we should fall back to (require 'mu4e) if mu4e-autoloads is not found.)

@bcc32 bcc32 force-pushed the fix-mu4e-for-installs-outside-package-directory-list branch from bd55998 to 37f9ea0 Compare April 3, 2025 16:05
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.

[mu4e] Wrong type argument: commandp, mu4e
2 participants